@@ -70,6 +70,7 @@ class MobileUnityWidgetController extends UnityWidgetController {
7070
7171 /// Checks to see if unity player is ready to be used
7272 /// Returns `true` if unity player is ready.
73+ @override
7374 Future <bool ?>? isReady () {
7475 if (! _unityWidgetState.widget.enablePlaceholder) {
7576 return UnityWidgetPlatform .instance.isReady (unityId: unityId);
@@ -79,6 +80,7 @@ class MobileUnityWidgetController extends UnityWidgetController {
7980
8081 /// Get the current pause state of the unity player
8182 /// Returns `true` if unity player is paused.
83+ @override
8284 Future <bool ?>? isPaused () {
8385 if (! _unityWidgetState.widget.enablePlaceholder) {
8486 return UnityWidgetPlatform .instance.isPaused (unityId: unityId);
@@ -88,6 +90,7 @@ class MobileUnityWidgetController extends UnityWidgetController {
8890
8991 /// Get the current load state of the unity player
9092 /// Returns `true` if unity player is loaded.
93+ @override
9194 Future <bool ?>? isLoaded () {
9295 if (! _unityWidgetState.widget.enablePlaceholder) {
9396 return UnityWidgetPlatform .instance.isLoaded (unityId: unityId);
@@ -97,6 +100,7 @@ class MobileUnityWidgetController extends UnityWidgetController {
97100
98101 /// Helper method to know if Unity has been put in background mode (WIP) unstable
99102 /// Returns `true` if unity player is in background.
103+ @override
100104 Future <bool ?>? inBackground () {
101105 if (! _unityWidgetState.widget.enablePlaceholder) {
102106 return UnityWidgetPlatform .instance.inBackground (unityId: unityId);
@@ -107,6 +111,7 @@ class MobileUnityWidgetController extends UnityWidgetController {
107111 /// Creates a unity player if it's not already created. Please only call this if unity is not ready,
108112 /// or is in unloaded state. Use [isLoaded] to check.
109113 /// Returns `true` if unity player was created succesfully.
114+ @override
110115 Future <bool ?>? create () {
111116 if (! _unityWidgetState.widget.enablePlaceholder) {
112117 return UnityWidgetPlatform .instance.createUnityPlayer (unityId: unityId);
@@ -121,6 +126,7 @@ class MobileUnityWidgetController extends UnityWidgetController {
121126 /// ```dart
122127 /// postMessage("GameManager", "openScene", "ThirdScene")
123128 /// ```
129+ @override
124130 Future <void >? postMessage (String gameObject, methodName, message) {
125131 if (! _unityWidgetState.widget.enablePlaceholder) {
126132 return UnityWidgetPlatform .instance.postMessage (
@@ -140,6 +146,7 @@ class MobileUnityWidgetController extends UnityWidgetController {
140146 /// ```dart
141147 /// postJsonMessage("GameManager", "openScene", {"buildIndex": 3, "name": "ThirdScene"})
142148 /// ```
149+ @override
143150 Future <void >? postJsonMessage (
144151 String gameObject, String methodName, Map <String , dynamic > message) {
145152 if (! _unityWidgetState.widget.enablePlaceholder) {
@@ -154,6 +161,7 @@ class MobileUnityWidgetController extends UnityWidgetController {
154161 }
155162
156163 /// Pause the unity in-game player with this method
164+ @override
157165 Future <void >? pause () {
158166 if (! _unityWidgetState.widget.enablePlaceholder) {
159167 return UnityWidgetPlatform .instance.pausePlayer (unityId: unityId);
@@ -162,6 +170,7 @@ class MobileUnityWidgetController extends UnityWidgetController {
162170 }
163171
164172 /// Resume the unity in-game player with this method idf it is in a paused state
173+ @override
165174 Future <void >? resume () {
166175 if (! _unityWidgetState.widget.enablePlaceholder) {
167176 return UnityWidgetPlatform .instance.resumePlayer (unityId: unityId);
@@ -171,6 +180,7 @@ class MobileUnityWidgetController extends UnityWidgetController {
171180
172181 /// Sometimes you want to open unity in it's own process and openInNativeProcess does just that.
173182 /// It works for Android and iOS is WIP
183+ @override
174184 Future <void >? openInNativeProcess () {
175185 if (! _unityWidgetState.widget.enablePlaceholder) {
176186 return UnityWidgetPlatform .instance.openInNativeProcess (unityId: unityId);
@@ -180,6 +190,7 @@ class MobileUnityWidgetController extends UnityWidgetController {
180190
181191 /// Unloads unity player from th current process (Works on Android only for now)
182192 /// iOS is WIP. For more information please read [Unity Docs] (https://docs.unity3d.com/2020.2/Documentation/Manual/UnityasaLibrary.html)
193+ @override
183194 Future <void >? unload () {
184195 if (! _unityWidgetState.widget.enablePlaceholder) {
185196 return UnityWidgetPlatform .instance.unloadPlayer (unityId: unityId);
@@ -188,6 +199,7 @@ class MobileUnityWidgetController extends UnityWidgetController {
188199 }
189200
190201 /// Quits unity player. Note that this kills the current flutter process, thus quiting the app
202+ @override
191203 Future <void >? quit () {
192204 if (! _unityWidgetState.widget.enablePlaceholder) {
193205 return UnityWidgetPlatform .instance.quitPlayer (unityId: unityId);
@@ -206,6 +218,7 @@ class MobileUnityWidgetController extends UnityWidgetController {
206218 _onUnityUnloadedSub = null ;
207219 }
208220
221+ @override
209222 void dispose () {
210223 _cancelSubscriptions ();
211224 UnityWidgetPlatform .instance.dispose (unityId: unityId);
0 commit comments