flutter-unity-view-widget
flutter-unity-view-widget copied to clipboard
Call API function on dispose error
Hi, whenever i tried to call _unityWidgetController.dispose/unload/pause/postMessage... in dispose the app did nothing with the following error
@override
void dispose() {
super.dispose();
_unityWidgetController.dispose();
}
Unhandled Exception: MissingPluginException(No implementation found for method unity#pausePlayer on channel plugin.xraph.com/unity_view_8)
E/flutter (14940): #0 MethodChannel._invokeMethod
package:flutter/…/services/platform_channel.dart:156
E/flutter (14940): <asynchronous suspension>
E/flutter (14940): #1 MethodChannelUnityViewFlutter.pausePlayer
package:flutter_unit
However if i call in button press it work fine
IconButton(
icon: Icon(
Icons.chevron_left,
),
onPressed: () {
_unityWidgetController.pause();
Navigator.of(context).pop();
},
),
Did I miss something? Thank you.
PS: I use flutter_unity_widget: ^4.0.1+1
same issues
Same issues. Im using flutter_unity_widget 4.2.1
@juicycleff @Ahmadre This bug still exist, and I think its important to refer some suggestions how to fix it.
@dawiddszewczyk what platform?
@juicycleff Unity: OS: iOS Version 15.5 Editor Version 2021.1.24f1
Smartphone: Device: iPhone SE OS: iOS Version 15.5
Will mark it as buy a d assign it to me