2020-10-06から1日間の記事一覧
概要 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.Reflection; using UnityEditor; using UnityEngine; public static class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { var rectTransform = ( RectTransform ) Selection.activeTransform; var type = typeof( R…
概要 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…
概要 問題を回避するためには StreamingAssets 内のファイルの名前を すべて小文字にする必要があるらしい Unity 2020.1 以降は Gradle 3.6 が使用されており、この問題が発生しない?
概要 using UnityEditor; using UnityEngine; [InitializeOnLoad] public static class Example { static Example() { EditorApplication.playModeStateChanged += OnChanged; } private static void OnChanged( PlayModeStateChange change ) { if ( !Progr…