class in UnityEngine
/
Hereda de:Scripting.PreserveAttribute
Permite un método de la clase runtime en ser inicializada cuando el juego de Unity carga en tiempo de ejecución sin acciones del usuario.
Methods marked [RuntimeInitializeOnLoadMethod] are invoked after scene has been loaded (i.e. after Awake method has been invoked). Note: Order of execution of methods marked [RuntimeInitializeOnLoadMethod] is not guaranteed.
using UnityEngine;
class MyClass { [RuntimeInitializeOnLoadMethod] static void OnRuntimeMethodLoad () { Debug.Log("After scene is loaded and game is running"); }
[RuntimeInitializeOnLoadMethod] static void OnSecondRuntimeMethodLoad () { Debug.Log("SecondMethod After scene is loaded and game is running."); } }
| loadType | Establece el tipo de RuntimeInitializeOnLoadMethod. |
| RuntimeInitializeOnLoadMethodAttribute | Permite un método de la clase runtime en ser inicializada cuando el juego de Unity carga en tiempo de ejecución sin acciones del usuario. |