Ejemplo n.º 1
0
    /*-------------------------------------------------------------------------
     * 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();
    }
Ejemplo n.º 4
0
 void OnDestroy()
 {
     // Singleton implementation
     _instance = null;
 }