How do i make a restart function with a ARCamera?

I try to make a restart button for my game. I am using different scene’s and that works fine but when i try to go back to the first scene it’s duplicating my camera and enable my imagetargets. It only shows the colliders. Does somebody know how to fix this?

Check the scripts on the ARCamera, likely scenario is that one of the scripts is doing a “DontDestroyOnLoad()” for the ARCamera object, this means it is not destroyed when moving between scenes.

So whats happening, is you have one ARCamera created in a scene and persisting, you move to another scene, and then you go BACK to the first scene again, that scene loads in the ARCamera object as it is in that scene, so you have two, both marked for non-deletion.

I would suggest modifying the ARCamera script, or adding a separate script to the object, that looks for another object called ARCamera and if it finds one, it destroys itself as it is a duplicate. This should fix the issue for you.