Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Oculus go app crashing while loading a scene.

Discussion in 'Scripting' started by belhadj_hmida, Jan 20, 2020.

  1. belhadj_hmida

    belhadj_hmida

    Joined:
    Jul 28, 2017
    Posts:
    2
    I am working on an app for oculus go and i am currently facing a memory problem, scripts are running great and nothing in the scene is generated using any script. Everything was great until models were integrated and lights were built. I have 2 scenes, one of them is used in 2 cases and the other one is used only once. the one which i am using twice is driving me crazy, because in one use case it does not crash but in the other it crashes and i am 99% sure it is an out of memory problem because the app crashes while the app is frozen loading the scene and i used adb to track memory usage and free memory dropped below 40MB and that's where app crashes. The thing is that the scene where crashing happens only causes the crash if i load it from another scene, when i open it directly when the app starts there is no problem. And we tried reducing the number of objects in the scene and there was an obvious difference like we had to navigate few time between scenes until the app crashes.
    THE REAL QUESTION: is there a way to load a scene and unload the previous loaded scene?
     
  2. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,186
    When you switch scenes, stuff is automatically unloaded. If it's not, you may have stuff in dontdestroyonload or you're using additive loading. The go is not a powerful device, so you might just be trying to overload it. You'll need to better manage your resources in the one scene.