Exemplo n.º 1
0
        private void Initialization()
        {
            presenter = new GameObject("AUDIO").AddComponent <AudioPresenter>();
            var listener = new GameObject("LISTENER").AddComponent <AudioListener>();

            listener.transform.SetParent(presenter.transform);
            presenter.AudioListener = listener;
        }
Exemplo n.º 2
0
        void IDisposable.Dispose()
        {
            sourceMedia.Clear();
            var g = presenter.gameObject;

            presenter = null;
#if UNITY_EDITOR
            GameObject.DestroyImmediate(g);
#else
            GameObject.Destroy(g);
#endif
        }
Exemplo n.º 3
0
 private void Initialization()
 {
     presenter = new GameObject("AUDIO").AddComponent<AudioPresenter>();
     var listener = new GameObject("LISTENER").AddComponent<AudioListener>();
     listener.transform.SetParent(presenter.transform);
     presenter.AudioListener = listener;
 }
Exemplo n.º 4
0
        void IDisposable.Dispose()
        {
            sourceMedia.Clear();
            var g = presenter.gameObject;
            presenter = null;
#if UNITY_EDITOR
            GameObject.DestroyImmediate(g);
#else
            GameObject.Destroy(g);
#endif
        }