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.

JavaClassWrapper

继承: Object

提供对 Java 原生接口的访问。

描述

The JavaClassWrapper singleton provides a way for the Godot application to send and receive data through the Java Native Interface (JNI).

Note: This singleton is only available in Android builds.

方法

JavaClass

wrap(name: String)


方法说明

JavaClass wrap(name: String) 🔗

Wraps a class defined in Java, and returns it as a JavaClass Object type that Godot can interact with.

Note: This method only works on Android. On every other platform, this method does nothing and returns an empty JavaClass.