Memory usage goes up by about 100 - 150 MB on each AR scene loading until app crashes, when repeated scene reloading
AR foundation preview.1 - 3.1.0
Very easy to reproduce this issue.
Add a button to any AR scene to SceneManager.LoadScene itself. When scene launches, repeated press that button to reload itself. Memory usage will increase by 100 - 150 mb every time the new scene loaded, until it goes above around 2 GB and the app will crash because of memory issue.
It doesn't matter whether it's loading itself or another scene. I tried to add two buttons to alternatively load two AR scenes, the issue is the same.
Same issue. Many people found this bug and post it to unity forum,but it have not be fiexd for a long time,this bug fixed in ARFoundation 2.0,when i use ARFoundation 2.0 with unity 2018,there is no memory leak,but appeared in ARFoundation 3.x version
We've identified a bug in the ARKit XR Plugin which will be fixed. Can you confirm this is iOS only?
[FALSE ALARM] sorry guys, I was trying to take a texture from the AR camera and apply it to the skybox. I did it in a stupid way which caused a memory leak. Profiling did the trick cause I narrowed it down to the script on the AR camera... that was not causing any problems in editor.
This part of my original post remains valid as ever: This could have maybe been avoided by having an instant preview of AR running from the editor... we desperately need that guys! not to mention build times are sooo long with IL2CPP.