Fix Android initialization.

This commit is contained in:
Nolan Darilek 2020-10-14 13:15:03 -05:00
parent 0abf1ffcdd
commit d58bb881e5

2
TTS.gd
View File

@ -21,6 +21,8 @@ func _init():
TTS = preload("godot-tts.gdns") TTS = preload("godot-tts.gdns")
if TTS and (TTS.can_instance() or Engine.editor_hint): if TTS and (TTS.can_instance() or Engine.editor_hint):
tts = TTS.new() tts = TTS.new()
if tts:
if not tts is JNISingleton:
self.add_child(tts) self.add_child(tts)
if self.are_utterance_callbacks_supported: if self.are_utterance_callbacks_supported:
tts.connect("utterance_begin", self, "_on_utterance_begin") tts.connect("utterance_begin", self, "_on_utterance_begin")