Content-Length: 18398 | pFad | https://docs.unity3d.com/6000.5/Documentation/ScriptReference/InitializeOnLoadMethodAttribute.html
Allow an editor class method to be initialized when Unity loads without action from the user.
For new code, use OnCodeInitializingAttribute instead for better resource pre-allocation timing. For more information, refer to Code reload and the code lifecycle in the manual.
using UnityEngine; using UnityEditor;
class MyClass { [InitializeOnLoadMethod] static void OnProjectLoadedInEditor() { Debug.Log("Project loaded in Unity Editor"); } }
Fetched URL: https://docs.unity3d.com/6000.5/Documentation/ScriptReference/InitializeOnLoadMethodAttribute.html
Alternative Proxies: