Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question ARFoundatin crashes on level loading

Discussion in 'AR' started by acme3D, Feb 16, 2022.

  1. acme3D

    acme3D

    Joined:
    Feb 4, 2009
    Posts:
    202
    Hi all,
    I'm having this issue:
    - Unity scene loads a new scene that uses AR Foundation, spawns a prefab and allows to position it in the environment
    - everything in the AR scene works ok
    - I reload the previous scene
    In doing this process (going back and forth from the two scenes) max at the second/third time the app crashes and quits. This happens on several iOS devices. The editor (which of course is not really starting AR) doesn't seem to have any problem.
    Has anyone had this kind of experience? What is the correct way of unloading a scene that was using AR Foundation?
    I tried to look into Unity documentation but there is no mention about that....
     
  2. todds_unity

    todds_unity

    Unity Technologies

    Joined:
    Aug 1, 2018
    Posts:
    324
  3. AsemBahra

    AsemBahra

    Joined:
    Jun 29, 2020
    Posts:
    1
    I have a similar problem and did exactly as the sample scene but when I try to go back from an AR scene to the menu the app crash
    the AR scene contain :
    1. AR Session Origin : with AR Plane Manager , AR Anchor Manager , AR Cloud Manager , AR Ray Cast Manager
    2. AR Session : with AR Input Manager
    3. AR Core Extensions
    4. AR Cloud Controller

    for the switching from the Menu to the AR Scene I use :
    LoaderUtility.Initialize();
    SceneManager.LoadScene(1, LoadSceneMode.Single);

    for the switching from AR scene to the menu I use :
    SceneManager.LoadScene(1, LoadSceneMode.Single);
    LoaderUtility.Deinitialize();
    tried disabling all the AR component or destroying the gameObjects
    tried disable all the plane detected and the plane manager and didn't work

    also couldn't get valid information from the logcat
    and thanks .
     

    Attached Files:

    ROBYER1 likes this.
  4. todds_unity

    todds_unity

    Unity Technologies

    Joined:
    Aug 1, 2018
    Posts:
    324