Beispiel #1
0
        public bool Initialize(VoiceoverManager manager)
        {
            if (manager == null)
            {
                return(false);
            }
            else
            {
                voiceoverManager = manager;
            }

            if (!string.IsNullOrEmpty(masterVoiceoverEvent))
            {
                eventDescription = FMODUnity.RuntimeManager.GetEventDescription(masterVoiceoverEvent);

                if (eventDescription.isValid())
                {
                    eventDescription.is3D(out is3D);
                    eventDescription.getMaximumDistance(out maxDistance);
                }
                else
                {
                    Debug.LogError("The master voiceover event is invalid for '" + speaker.ToString() + "'.");
                    return(false);
                }
            }
            else
            {
                Debug.LogError("The master voiceover event is missing for '" + speaker.ToString() + "'.");
                return(false);
            }

            voiceoverCallback        = new FMOD.Studio.EVENT_CALLBACK(VoiceEventCallback);
            initializationSuccesfull = true;

            return(true);
        }