private void Awake() { if (Instance == null) { Instance = this; } else if (Instance != this) { Destroy(gameObject); } _mainThreadActions = new List <Action>(); _mainThreadActionsMultiple = new List <Action>(); }
/*void Start() * { * // BIG HUGE NOTE: WebGL doesn't do multithreading. * * Debug.Log("Start() -- Started."); * functionsToRunInMainThread = new List<Action>(); * * StartThreadedFunction( () => { SlowFunctionThatDoesAUnityThing( Vector3.zero, new float[4], new Color[100] ); } ); * * Debug.Log("Start() -- Done."); * }*/ void Awake() { instance = this; functionsToRunInMainThread = new List <Action>(); }
private void Awake() { instance = this; }