mirror of
https://github.com/lightsoutgames/godot-tts
synced 2024-11-22 00:15:56 +00:00
Fix Android initialization.
This commit is contained in:
parent
0abf1ffcdd
commit
d58bb881e5
4
TTS.gd
4
TTS.gd
|
@ -21,7 +21,9 @@ 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()
|
||||||
self.add_child(tts)
|
if tts:
|
||||||
|
if not tts is JNISingleton:
|
||||||
|
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")
|
||||||
tts.connect("utterance_end", self, "_on_utterance_end")
|
tts.connect("utterance_end", self, "_on_utterance_end")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user