Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
JNISingleton
繼承: Object
將引擎與 Android 外掛程式連接起來以與原生 Android 程式碼互動的單例。
說明
JNISingleton 僅在 Android 匯出中實作。它用於從用 Java 或 Kotlin 編寫的 Android 外掛程式呼叫方法、連接訊號。方法和訊號可以被呼叫並連接到 JNISingleton,就好像它是一個 Node 一樣。有關更多資訊,請參閱 Java 本地介面 - 維琪百科。
教學
方法
has_java_method(method: StringName) const |
方法說明
bool has_java_method(method: StringName) const 🔗
Returns true if the given method name exists in the JNISingleton's Java methods.