Search Unity

Question Prefab Appearing Twice in AR Unity App

Discussion in 'AR' started by abandonedlabs, Nov 24, 2022.

  1. abandonedlabs

    abandonedlabs

    Joined:
    Nov 22, 2022
    Posts:
    2
    Hi! I am trying to build a very simple Image Tracking App for iOs. I have imported my obj that I want to use as a prefab into Unity, created an empty game object and then dragged my obj onto that. This prefab I then dragged into my assets folder and from there onto the slot for the prefab in the AR Sessions Origin. When I run the app it works, but the prefab somehow appears twice. One on the image, like it should, and one hovering over that, which I don't want. I am new to Unity and don't know how to fix the issue. Any help would be amazing, thank you in advance!
     
  2. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    1,062
    After you dragged the GameObject to your Assets folder to create the prefab, did you delete the prefab instance from your scene? It sounds like you want to spawn the prefab based on image tracking, so your scene should not contain any instances of it. (You will spawn the instance when an image is detected.)
     
    abandonedlabs likes this.
  3. abandonedlabs

    abandonedlabs

    Joined:
    Nov 22, 2022
    Posts:
    2
    That fixed it, thank you so much!!!
     
    andyb-unity likes this.