using UnityEditor.Callbacks; using UnityEngine; public class Example { [DidReloadScripts] private static void Log() { Debug.Log( "コンパイルされました" ); } }
using UnityEditor.Callbacks; using UnityEngine; public class Example { [DidReloadScripts( 1 )] private static void Log() { Debug.Log( "実行順も指定できます" ); } }