UnityWidgetController class abstract

Constructors

UnityWidgetController()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

create() Future<bool?>?
Creates a unity player if it's not already created. Please only call this if unity is not ready, or is in unloaded state. Use isLoaded to check. Returns true if unity player was created succesfully.
dispose() → void
inBackground() Future<bool?>?
Helper method to know if Unity has been put in background mode (WIP) unstable Returns true if unity player is in background.
isLoaded() Future<bool?>?
Get the current load state of the unity player Returns true if unity player is loaded.
isPaused() Future<bool?>?
Get the current pause state of the unity player Returns true if unity player is paused.
isReady() Future<bool?>?
Checks to see if unity player is ready to be used Returns true if unity player is ready.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openInNativeProcess() Future<void>?
Sometimes you want to open unity in it's own process and openInNativeProcess does just that. It works for Android and iOS is WIP
pause() Future<void>?
Pause the unity in-game player with this method
postJsonMessage(String gameObject, String methodName, Map<String, dynamic> message) Future<void>?
Post message to unity from flutter. This method takes in a Json or map structure as the message. The gameObject must match the name of an actual unity game object in a scene at runtime, and the methodName, must exist in a MonoDevelop class and also exposed as a method. message is an parameter taken by the method
postMessage(String gameObject, dynamic methodName, dynamic message) Future<void>?
Post message to unity from flutter. This method takes in a string message. The gameObject must match the name of an actual unity game object in a scene at runtime, and the methodName, must exist in a MonoDevelop class and also exposed as a method. message is an parameter taken by the method
quit() Future<void>?
Quits unity player. Note that this kills the current flutter process, thus quiting the app
resume() Future<void>?
Resume the unity in-game player with this method idf it is in a paused state
toString() String
A string representation of this object.
inherited
unload() Future<void>?
Unloads unity player from th current process (Works on Android only for now) iOS is WIP. For more information please read Unity Docs

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

webRegistrar ↔ dynamic
getter/setter pair

Static Methods

init(int id, dynamic unityWidgetState) Future<UnityWidgetController>
Initialize UnityWidgetController with id Mainly for internal use when instantiating a UnityWidgetController passed in UnityWidget.onUnityCreated callback.
registerWith(dynamic registrar) → void
Method required for web initialization