リポジトリ 使用例 ProjectSettings フォルダに 「GvhProjectSettings.xml.source」というファイルを格納することで コンパイル開始時や Unity エディタがフォーカスされた時に 「GvhProjectSettings.xml.source」を「GvhProjectSettings.xml」に上書きコピ…
リポジトリ 使用例 Project Settings で「Is Enable」をオンにすると シーンの Dirty フラグが立った原因が Console ウィンドウに出力されるようになります
リポジトリ 準備 本パッケージを使用するためには Python のインストールと 以下の Python パッケージのインストールが必要です pip install librosa pip install soundfile 使用例 using Kogane; using UnityEditor; public static class Example { [MenuIt…
はじめに 「Fast Script Reload」を Unity プロジェクトに導入することで Unity 再生中にスクリプトの変更を反映できる(ホットリロードできる)ようになります 使い方 導入時に上記のダイアログが表示されたら「OK」を押して Auto Refresh を無効にします …
概要 using UnityEditor; public class Example : AssetPostprocessor { private void OnPreprocessTexture() { if ( !assetPath.StartsWith( "Assets/" ) ) return; // 警告を設定 context.LogImportWarning( "ピカチュウ", context.mainObject ); // エラ…
概要 「Shader Graph to PNG」を Unity プロジェクトに導入することで ShaderGraph のスクリーンショットを保存できるようになります 使い方 ShaderGraph のウィンドウを右クリックして「Graph To PNG」を押すと 「Assets/ShaderGraphScreenshots」にスクリ…
概要 「FixPackageManagerSeeAllVersions」を Unity プロジェクトに導入することで Package Manager ですべてのバージョンを見られるようになります 導入前 導入後 Project Settings の「Player > See All Versions」をオンにすると Package Manager に「See…
リポジトリ 使用例 using System; using Kogane; using UnityEditor; public static class Example { [MenuItem( "Tools/Hoge" )] public static void Hoge() { SetAndroidHomeToEnvironmentVariable.Set( EnvironmentVariableTarget.Process ); } }
リポジトリ 使用例 using Kogane; using UnityEditor; [InitializeOnLoad] public static class Example { static Example() { // 開発ビルドかリリースビルドか設定します SetXcodePushNotificationOnPostProcessBuild.OnIsProduction = () => false; } }
リポジトリ 使用例 using Kogane; using UnityEditor; using UnityEngine; public static class Example { [MenuItem( "Tools/Hoge" )] public static void Hoge() { var data = new InstallPlayAssetDeliveryAndroidAppBundleData ( androidAppBundlePath: …
リポジトリ 使用例
リポジトリ 使用例 using System.Linq; using Kogane; using UnityEditor; public static class Example { [MenuItem( "Tools/Hoge" )] public static void Hoge() { const bool isReleaseBuild = false; var options = new BuildPlayerOptions { scenes = E…
リポジトリ 使用例
リポジトリ 使用例 using Kogane; using UnityEditor; using UnityEngine; public static class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { // Device Simulator で選択されているデバイスの名前を取得します Debug.Log( DeviceSim…
リポジトリ 使用例
リポジトリ 使用例 using Kogane; using UnityEngine; [RenameGameObject] public sealed class Example : MonoBehaviour { }
リポジトリ 使用例
リポジトリ 使用例
リポジトリ 使用例 using Kogane; using UnityEngine; [MoveComponentUp( typeof( Rigidbody2D ) )] public sealed class Example : MonoBehaviour { } using Kogane; using UnityEngine; [MoveComponentDown( typeof( Rigidbody2D ) )] public sealed class…
リポジトリ 使用例 以下のタイミングで Build Settings の Scenes In Build から Deleted なシーンを自動で削除します シーンファイル(.unity)を削除した時 プロジェクトを保存した時 ビルドを開始した時
リポジトリ 使用例 .asmdef やフォルダを選択した状態で右クリックして 「Kogane > Sort Assembly Definition References」を押すと 選択中の .asmdef や選択中のフォルダに含まれる すべての .asmdef の Assembly Definition References を 名前順でソート…
リポジトリ 使用例 Project Settings で Jenkins の情報を書き込むテキストファイルの保存場所や 書き込むテキストファイルのフォーマットを設定します "C:\Program Files\Unity\Hub\Editor\2022.1.11f1\Editor\Unity.exe" ^ -quit ^ -batchmode ^ -executeM…
リポジトリ 使用例 Project Settings で Git の情報を書き込むテキストファイルの保存場所や 書き込むテキストファイルのフォーマットを設定します using UnityEngine; public class Example : MonoBehaviour { private void Awake() { var textAsset = Reso…
リポジトリ 使用例
リポジトリ 使用例
リポジトリ 使用例
リポジトリ 使用例 「Add Bookmark」を押すと現在使用しているデバイスをブックマークできます ブックマークしたデバイスを選択すると即座にそのデバイスに切り替えられます
リポジトリ 使用例 using Kogane; using UnityEditor; public static class Example { [MenuItem( "Assets/Hoge" )] public static void Hoge() { TooltipWindow.Open( "ピカチュウ" ); } }
リポジトリ 使用例 Console ウィンドウで検索したいテキストを Project Settings で設定します 項目 内容 Button Text ボタンに表示するテキスト Filtering Text ボタンを押した時に検索欄に入力するテキスト未入力ならボタンを押した時に Button Text に設…
ソースコード #if UNITY_IOS using UnityEditor; using UnityEditor.Callbacks; using UnityEditor.iOS.Xcode; internal static class Example { [PostProcessBuild] private static void OnPostProcessBuild ( BuildTarget buildTarget, string pathToBuilt…