UnityKitWeb class

Web (WebGL) implementation of the unity_kit platform plugin.

Registers the com.unity_kit/unity_view platform view as an HTMLDivElement host and bridges Flutter <-> Unity over the per-view MethodChannel that the shared Dart layer already uses on mobile. The channel is bound to the plugin BinaryMessenger so app commands and Unity callbacks flow in opposite directions without clashing.

Hosting the Unity WebGL build

The app ships the Unity WebGL output and exposes a global loader matching Unity's generated createUnityInstance:

// web/index.html
window.unityKitCreateInstance = (canvas, config) =>
  createUnityInstance(canvas, config);

Unity reports back to Flutter through window.unityKitSendToFlutter(json), which this plugin installs automatically.

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

registerWith(Registrar registrar) → void
Registers this plugin with the Flutter web engine.