Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unity widget on top of other Flutter widgets #606

Closed
lim1105 opened this issue Jun 3, 2022 · 1 comment
Closed

Unity widget on top of other Flutter widgets #606

lim1105 opened this issue Jun 3, 2022 · 1 comment

Comments

@lim1105
Copy link

lim1105 commented Jun 3, 2022

Describe the bug
When there is a Unity widget in the screen, other widget like Stack and Modal will be covered by Unity widget / at lower layer.
But the Flutter widgets are working fine.

This happens on Android device only in my case.
IOS device I had (iPhone 6 IOS 12.5.5) doesn't have this issue
Wonder if something we can change in Android native side that will solve this?

Screenshots

Flutter:

  • Flutter 3.0.0
  • Dart 2.17.0
  • flutter_unity_widget: ^4.2.3

Unity:

  • OS: MacOS Monterey 12.2.1
  • Version 2020.3.26f1

Smartphone:

  • Device: Redmi Note 9S
  • OS: Android 10
  • Version 10 QKQ1.191215.002
@lim1105
Copy link
Author

lim1105 commented Jun 7, 2022

I'm able to resolved this by using:

  • Flutter: 2.10.5
  • and the solution below

credit to smashmountainstudio
can refer to this for the discussion #400

void _onUnityCreated(controller) async  {
    _unityWidgetController = controller;

    await _unityWidgetController.pause();

    Future.delayed(
      Duration(milliseconds: 100),
          () async {
        await this._unityWidgetController.resume();
      },
    );
  }

tips: use FVM (Flutter Version Management) to quickly switch between Flutter versions

@lim1105 lim1105 closed this as completed Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant