private void Awake() { if (_Instance != null) { Destroy(gameObject); return; } if (isDontDestroyOnLoad) { DontDestroyOnLoad(gameObject); } _Instance = this; _serviceLocator = new ServiceLocator(); _serviceLocator.InitServices(); _textToSpeechManager = _serviceLocator.Get <ITextToSpeechManager>(); _mediaManager = _serviceLocator.Get <IMediaManager>(); _textToSpeechManager.GetVoicesSuccessEvent += GetVoicesSuccessEventHandler; _textToSpeechManager.SynthesizeSuccessEvent += SynthesizeSuccessEventHandler; _textToSpeechManager.GetVoicesFailedEvent += GetVoicesFailedEventHandler; _textToSpeechManager.SynthesizeFailedEvent += SynthesizeFailedEventHandler; }