UIWebView
Embedded web view widget exposed by the Java runtime.
Create in the Editor
- Ensure there is a
UIControllerin the scene. - Create a GameObject and add
UIRect. - Add the
UIWebViewcomponent.
How to Use
- Get the component with
myObject.findComponent(UIWebView.class). - Read or write the component properties to control behavior.
- Test input or layout in Play mode.
Java Example
SpatialObject myObject = /* your object */;
UIWebView comp = myObject.findComponent(UIWebView.class);
if (comp != null) {
Texture tex = /* load texture */ null;
// set the url value:
comp.url = "https://example.com";
// read the url value:
String urlValue = comp.url;
// set the fps value:
comp.fps = 30;
// read the fps value:
int fpsValue = comp.fps;
// set the enableVirtualKeyboard value:
comp.enableVirtualKeyboard = true;
// read the enableVirtualKeyboard value:
boolean enableVirtualKeyboardValue = comp.enableVirtualKeyboard;
// set the allowHibernate value:
comp.allowHibernate = false;
// read the allowHibernate value:
boolean allowHibernateValue = comp.allowHibernate;
// read the texture value:
Texture textureValue = comp.texture;
// read the loadedUrl value:
String loadedUrlValue = comp.loadedUrl;
}