void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } }
public virtual void Start(Action <string> _completionCallback) { completionCallback = _completionCallback; //This allows us to set a mock for testing during the initialisation phase. if (coRoutineHelper == null) { coRoutineHelper = CoRoutineHelper.instance; } while (!cameraRig.isActiveAndEnabled) { Debug.Log("Waiting for camera rig to become active"); } }