コード例 #1
0
 void OnDestroy()
 {
     if (_instance == this)
     {
         _instance = null;
     }
 }
コード例 #2
0
    void Awake()
    {
        if (_instance == null)
        {
            _instance = this;
        }
        if (_instance != this)
        {
            Log.w(LOG_TAG, "Has another [WaveVR] object in a scene. Destory this.");
            Destroy(this);
            return;
        }

        if (WaveVR.Instance.Initialized)
        {
            Log.i(LOG_TAG, "Initialized");
        }
    }
コード例 #3
0
    void Awake()
    {
        if (_instance == null)
        {
            _instance = this;
        }
        if (_instance != this)
        {
            Log.w(LOG_TAG, "Has another [WaveVR] object in a scene. Destory this.");
            Destroy(this);
            return;
        }

#if UNITY_EDITOR
        if (Application.isEditor)
        {
            return;
        }
#endif
        if (WaveVR.Instance != null)
        {
            Log.d(LOG_TAG, "Initialized");
        }
    }