-
Notifications
You must be signed in to change notification settings - Fork 584
Description
Describe the bug
There's no way to release resources used by UnityWidget. We are using Unity for an AR feature, and the second time you open the screen with a UnityWidget, camera lags a lot and there's no loading screen, meaning previous Unity resources were not released. Moreover, doing it 2/3 times fast enough crashes the app because it runs out of memory.
To Reproduce
In the example app, you can see a similar behavior:
- Open rotation sample
- "Made with Unity" loading screen is shown
- Go back
- Open rotation sample again
- No "Made with Unity" screen is shown, the controller was not released/disposed properly
Expected behavior
After disposing the controller, it should stop all Unity resources
Actual behavior
Disposing/unloading the controller doesn't help with resources, and calling quit closes the app.
Smartphone (please complete the following information):
- Device: OnePlus 5
- OS: Android
- Version: 10
Additional context
Also tried using openInNativeProcess and adding the extended activity in manifest, but that way we can't communicate with messages to the Unity process.