Пример #1
0
        // ReSharper disable once UnusedMember.Local
        private void Start()
        {
            // this code needs to wait for cloning (for weight).
            var theParent = ParentGroup;

            if (theParent == null)
            {
                Debug.LogError("Sound Variation '" + name + "' has no parent!");
                return;
            }

            GameObj.layer = MasterAudio.Instance.gameObject.layer;

            switch (audLocation)
            {
            case MasterAudio.AudioLocation.FileOnInternet:
                if (internetFileLoadStatus == MasterAudio.InternetFileLoadStatus.Loading)
                {
                    LoadInternetFile();
                }
                break;
            }

#if UNITY_5 || UNITY_2017
            SetMixerGroup();
            SetSpatialBlend();
#endif

            SetPriority();

            SetOcclusion();

            SpatializerHelper.TurnOnSpatializerIfEnabled(VarAudio);
        }
Пример #2
0
        // ReSharper disable once UnusedMember.Local
        private void Start()
        {
            // this code needs to wait for cloning (for weight).
            var theParent = ParentGroup;

            if (theParent == null)
            {
                Debug.LogError("Sound Variation '" + name + "' has no parent!");
                return;
            }

            GameObj.layer = MasterAudio.Instance.gameObject.layer;

            var shouldDisableVariation = true;

            switch (audLocation)
            {
#if ADDRESSABLES_ENABLED
            case MasterAudio.AudioLocation.Addressable:
                if (_loadAddressableCoroutine != null)
                {
                    shouldDisableVariation = false;
                }
                break;
#endif
            default:
                break;     // no warning
            }

            SetMixerGroup();
            SetSpatialBlend();

            SetPriority();

            SetOcclusion();

            SpatializerHelper.TurnOnSpatializerIfEnabled(VarAudio);

            if (shouldDisableVariation)
            {
                DTMonoHelper.SetActive(GameObj, false); // should begin disabled
            }
        }
Пример #3
0
        // ReSharper disable once UnusedMember.Local
        private void Start()
        {
            // this code needs to wait for cloning (for weight).
            var theParent = ParentGroup;

            if (theParent == null)
            {
                Debug.LogError("Sound Variation '" + name + "' has no parent!");
                return;
            }

            GameObj.layer = MasterAudio.Instance.gameObject.layer;

            var shouldDisableVariation = true;

            switch (audLocation)
            {
            case MasterAudio.AudioLocation.FileOnInternet:
                if (internetFileLoadStatus == MasterAudio.InternetFileLoadStatus.Loading)
                {
                    shouldDisableVariation = false;
                    LoadInternetFile();
                }
                break;
            }

            SetMixerGroup();
            SetSpatialBlend();

            SetPriority();

            SetOcclusion();

            SpatializerHelper.TurnOnSpatializerIfEnabled(VarAudio);

            if (shouldDisableVariation)
            {
                DTMonoHelper.SetActive(GameObj, false); // should begin disabled
            }
        }