void Awake() { #region Singleton boilerplate if (Singleton != null) { if (Singleton != this) { Debug.LogWarning($"There's more than one {Singleton.GetType()} in the scene!"); Destroy(gameObject); } return; } Singleton = this; #endregion Singleton boilerplate viewDir = -transform.forward; if (focusObjects == null) { focusObjects = new List <Transform>(); } }
private void checkCamfocus() { camFocus = ARCamera_obj.GetComponent <CameraFocusController>(); if (camFocus == null) { camFocus = ARCamera_obj.AddComponent <CameraFocusController>(); } }