/*------------------------------------------------------------------------- * Unity Lifecycle Functions * ----------------------------------------------------------------------*/ void Awake() { // Singleton implementation if (_instance != null) { Debug.LogError(this.ToString() + ": Singleton already exists. Destroying."); Destroy(this); } else { _instance = this; } if (!m_FingerTemplate) { Debug.LogError("No Finger template set!"); return; } if (!m_PalmTemplate) { Debug.LogError("No Palm template set!"); return; } CreateSceneHands(); }
void OnDestroy() { // Singleton implementation _instance = null; }
/*------------------------------------------------------------------------- * Unity Lifecycle Functions * ----------------------------------------------------------------------*/ void Awake() { // Singleton implementation if (_instance != null) { Debug.LogError(this.ToString() + ": Singleton already exists. Destroying."); Destroy(this); } else { _instance = this; } if( !m_FingerTemplate ) { Debug.LogError("No Finger template set!"); return; } if( !m_PalmTemplate ) { Debug.LogError("No Palm template set!"); return; } CreateSceneHands(); }