Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug ARfoundation/ARcore - App Crashes after adding prefab with animation/animation controller

Discussion in 'AR' started by dazaizone, Dec 6, 2023.

  1. dazaizone


    Mar 6, 2020
    - unity 2022.3.7f1
    - ARfoundation 5.0.7

    Hello I was able to build normally until today, after opening again my laptop and project and I was supposed to have a build test, I noticed that the app started to crash after camera request permission prompt after install.

    I already have ticked/used the IL2CPP backend and ARM64 way back and haven't changed any player settings since then, The last thing I made is adding some new prefab in my inspector, tried removing them as an initial suspect but still the app still crash.

    Thank you for the help.
  2. dazaizone


    Mar 6, 2020

    I just discovered and double test and checked that the prefab I made that has animation/animator controller attached is causing the crash, every time I add the prefab in the gameobject array for popup objects , the app starts crashing.

    any idea for this?

    to add information: the prefab is an empty object with 3 plane images a (spritesheet like) like for walk for example then I animated them by using the animation controller, set active = false and set active = true respectively.

    is this also memory issue that's why it crash?

    I will try to animate them via script instead and not use animation controller, will update later,

    I will also change the thread title. thank you

    **2nd test**
    I tried a for loop to animate-ish the gameobjects 3d planes = fail

    **3rd test**
    instead of an empty object that holds the 3 frames 3d plane, I used 1 3dplane and revise the script that changes materials to animate-ish the effect. = still fail
    Last edited: Dec 6, 2023
  3. thomas_key


    Unity Technologies

    Dec 14, 2019
    At this point, if you had no previous issues building until now, I'd do the following:

    - Close the editor, and any associated IDEs
    - Delete the "Library" folder, "obj" folder, and "Temp" folder if it exists after quitting the editor.
    - Reopen the project, switch to your platform target, and try building again.

    This might be a case of AssetDatabase corruption.

    Also try creating a new build in a new location as it's also possible that the IL2CPP generated codebase may have been corrupted at some point.
  4. andyb-unity


    Unity Technologies

    Feb 10, 2022
    I would also recommend that you look at your Player logs: There isn't enough information here to diagnose the source of the crash, but you should see errors in the logs that can help direct you to the source of your issue.