flutter-unity-view-widget icon indicating copy to clipboard operation
flutter-unity-view-widget copied to clipboard

MissingPluginException(No implementation found for method unity#isReady on channel plugin.xraph.com/unity_view_0)

Open NikeshNayak opened this issue 1 year ago • 1 comments

Error in postUnityMessage: MissingPluginException(No implementation found for method unity#isReady on channel plugin.xraph.com/unity_view_0) OR MissingPluginException(No implementation found for method dispose on channel unity_view_0)

To Reproduce Steps to reproduce the behavior:

  1. After second launch of game in UnityWidget
  2. When I try to communicate the UnityWidget using UnityController just after the game loaded
Future<void> flutterToUnity(String methodName, {String gameObject = 'BridgeManager', String message = ""}) async {
    try {
      final isReady = await _unityWidgetController.isReady();
      if (isReady != null && isReady) {
        log("message info: post call $gameObject, $methodName, $message");
        _unityWidgetController.postMessage(gameObject, methodName, message);
      }
    } catch (e) {
      debugPrint("Error in postUnityMessage: $e");
    }
  }
  1. My game wants some data to show like username, profile picture. I noticed that the communication between works fine at first launch of UnityWidget & its UnityController.
  2. Whenever I call flutterToUnity at secondLaunch its throw me above exception & that data passing to UnityWidget gets failed.

Expected behavior

It should work on second launch. There is some problem in this package that needs to be fixed.

flutter_unity_widget: ^2022.2.1

Unity (please complete the following information):

  • OS: Mac
  • Version : 2022.3.34f1

Smartphone (please complete the following information):

  • Device: Any Device
  • OS: Android & iOS

Note : If possible then this library needs to be updated with following issue fixed & should also support latest gradle system & kotlin versions

I request the owner of this package to provide me the solution as early as possible. I am too much reliable on this package. Quick Fix also accepted.

NikeshNayak avatar Dec 12 '24 20:12 NikeshNayak

@juicycleff Can you help me with this out ?

NikeshNayak avatar Dec 13 '24 05:12 NikeshNayak