リポジトリ 使用例
リポジトリ 使用例 using UnityEngine; public class Test : MonoBehaviour { public AnimationCurve m_animationCurve1; public AnimationCurve m_animationCurve2; }
リポジトリ 使用例 using JetBrains.Annotations; using UnityEngine; public class Test : MonoBehaviour { [NotNull] public GameObject m_gameObject; [NotNull] public Transform m_transform; } 設定 Preferences から設定を変更できます 項目 内容 Ena…
リポジトリ 使用例 設定 Preferences から設定を変更できます 項目 内容 Enabled 有効かどうか(デフォルトは OFF) Log Format エラーログのフォーマット
リポジトリ 使い方 Border を設定したいスプライトを右クリックして「UniSpriteBorderSetupper > 選択中のスプライトの Border を自動で設定」を選択すると 指定したスプライトの Border が自動で設定されます 複数のスプライトを選択してコマンドを実行する…
リポジトリ 使い方 Unity メニューの「Window > UniEditorPrefsWindow」を押すと EditorPrefs が保存しているすべてのキーと値を閲覧できます
リポジトリ ] 使い方 Unity メニューの「Window > UniPlayModeStartSceneSettingWindow」を選択して 表示されたウィンドウの「Start Scene」にシーンファイルを設定すると Unity 再生時に必ずそのシーンから開始するようになります 「Set Current Scene」ボ…
概要 using UnityEditor; using UnityEngine; using UnityEngine.SceneManagement; public static class Example { // すべてのゲームオブジェクトを Scene ビューで非表示にします [MenuItem( "SceneVisibilityManager/HideAll" )] private static void Hid…
概要 using UnityEngine; [SharedBetweenAnimators] public sealed class Example : StateMachineBehaviour { private int m_counter; // static ではない public override void OnStateEnter ( Animator animator, AnimatorStateInfo stateInfo, int layerI…
概要 using UnityEditor; using UnityEditorInternal; using UnityEngine; public class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { var invalidPath = @"\ピ/カ:チ*ュ?ウ"".<t>x|t"; var path = InternalEditorUtility.RemoveInvalid</t>…
概要 using UnityEditor; using UnityEditorInternal; public class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { InternalEditorUtility.OpenPlayerConsole(); } }
概要 using UnityEditor; using UnityEditorInternal; public class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { InternalEditorUtility.OpenEditorConsole(); } }
概要 using UnityEditor; using UnityEditorInternal; public class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { InternalEditorUtility.OpenFileAtLineExternal ( filename: "Assets/XXXX.cs", line: 0, // 行番号 column: 0 // 列…
概要 using UnityEditor; using UnityEngine; public class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { Debug.Log( UnityEditorInternal.InternalEditorUtility.isApplicationActive ); } }
概要 using UnityEditor.ShortcutManagement; using UnityEngine; public static class Example { // F1 で呼び出されるようにする [ClutchShortcut( "Kogane/Hoge1", KeyCode.F1 )] private static void Hoge1() { Debug.Log( "ピカチュウ" ); } // Alt + F…
概要 using System.Linq; using UnityEditor; using UnityEngine; public class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { var hasMissing = PlayerSettings .GetPreloadedAssets() .Any( x => x == null ) ; Debug.Log( hasMissi…
概要 using UnityEditor; using UnityEngine; [InitializeOnLoad] public static class Example { static Example() { EditorApplication.playModeStateChanged += OnChanged; } private static void OnChanged( PlayModeStateChange change ) { if ( !Progr…
概要 using UnityEditor.ShortcutManagement; using UnityEngine; public static class Example { // F1 で呼び出せるようにする [Shortcut( "Kogane/Hoge1", KeyCode.F1 )] private static void Hoge1() { Debug.Log( "ピカチュウ" ); } // Alt + F1 で呼び…
概要 using System.Linq; using UnityEditor; using UnityEditorInternal; using UnityEngine; public class Example : ScriptableObject { public int m_id = 25; public string m_name = "ピカチュウ"; [MenuItem( "Tools/Save" )] private static void Sa…
概要 using UnityEditor; using UnityEngine; public static class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { Debug.Log( BuildPipeline.IsBuildTargetSupported( BuildTargetGroup.iOS, BuildTarget.iOS ) ); Debug.Log( BuildPi…
概要 using UnityEditor; using UnityEngine; public static class Example { [MenuItem("Tools/Hoge")] private static void Hoge() { // C:/Program Files/Unity/Hub/Editor/2020.1.6f1/Editor/Data/PlaybackEngines/iOSSupport Debug.Log( BuildPipeline.…
概要
リポジトリ 使用例 using Kogane; using UnityEditor; public class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { // Hierarchy で選択中のゲームオブジェクトのリネームモードに入る SceneHierarchyInternal.RenameGO(); } }
リポジトリ 使い方 Unity メニューの「Edit > UniMissingScriptRemover」から どのシーンやプレハブから Missing Script を削除するか選択することで使用できます
リポジトリ 使用例 using Kogane; using UnityEditor; public class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { // Console ウィンドウでログを検索 ConsoleWindowInternal.SetFilter( "ピカチュウ" ); } }
リポジトリ 使用例 using Kogane; using UnityEditor; public class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { // Project ビューでアセットを検索 ProjectBrowserInternal.SetSearch( "ピカチュウ" ); } }
ソースコード using System; using UnityEditor; public sealed class LabelWidthScope : IDisposable { private readonly float m_oldLabelWidth; public LabelWidthScope( int labelWidth ) { m_oldLabelWidth = EditorGUIUtility.labelWidth; EditorGUIUt…
概要 using System.Linq; using UnityEditor; using UnityEngine; public class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { var paths = Selection .GetFiltered<DefaultAsset>( SelectionMode.DeepAssets ) .Select( x => AssetDatabase.GetAsse</defaultasset>…
概要 上記のスクリプトを Unity プロジェクトの Editor フォルダに追加して Unity メニューの「StyleSheetExporter > Export」を押すと エディタで使われている .uss をエクスポートできます
概要 using System.IO; using UnityEditor; using UnityEngine; public static class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { Debug.Log( Path.GetFullPath( "Packages/com.cysharp.unitask/Runtime/UniTask.asmdef" ) ); } } P…