juicycleff / flutter-unity-view-widget

Embeddable unity game engine view for Flutter. Advance demo here https://github.com/juicycleff/flutter-unity-arkit-demo
BSD 3-Clause "New" or "Revised" License
2.16k stars 524 forks source link

UnityWidget in IndexedStack will be reloaded every time the bottomNavigationBar switches. #391

Open guoguoguilai opened 3 years ago

guoguoguilai commented 3 years ago

Describe the bug A clear and concise description of what the bug is. UnityWidget in IndexedStack is reloaded all the time when the bottomNavigationBar switches.

To Reproduce Steps to reproduce the behavior: Build an app with bottomNavigationBar and IndexedStack, every time the bottomNavigationBar switches, the UnityWidget in IndexedStack would be reloaded. And the UnityId in _onPlatformViewCreated is increased.

Expected behavior The state of the UnityWidget keeps.

Unity (please complete the following information):

Smartphone (please complete the following information):

guoguoguilai commented 3 years ago

I think it is related to #278

guoguoguilai commented 3 years ago

Any update?