Beispiel #1
0
    //////////////////////////////////////////////////////////////////////////

    void Start()
    {
        if (instance == null)
        {
            instance = this;
            DontDestroyOnLoad(gameObject);
        }
        else
        {
            UnityEngine.Debug.LogError("[Accessibility] Trying to create another MacOS TTS instance, when there already is one.");
            DestroyImmediate(this);
            return;
        }
    }
Beispiel #2
0
    //////////////////////////////////////////////////////////////////////////

    void Start()
    {
        if (instance == null)
        {
            instance = this;

            // No longer needed, because this is now a child of the Accessibility Manager, which is already set to DontDestroyOnLoad
            //DontDestroyOnLoad(gameObject);
        }
        else
        {
            UnityEngine.Debug.LogError("[Accessibility] Trying to create another MacOS TTS instance, when there already is one.");
            DestroyImmediate(gameObject);
            return;
        }
    }