Search Unity

AR camera shows no background in play mode

Discussion in 'Vuforia' started by marcobeccarini, Sep 20, 2019.

  1. marcobeccarini

    marcobeccarini

    Joined:
    Sep 4, 2019
    Posts:
    1
    Hi everyone. I am currently working on a uni project with vuforia to augment a book front and back cover.
    I just finished my project and noticed that everything is working fine besides that when I play the scene, I can't see my camera feed as a background but just a dark screen (or whichever background is set on the "clear flags" of the ARCamera.
    Tracking works fine, the models are rendered correctly and everything moves accordingly to my book.
    What I noticed is that, when I open the project from the Unity Hub, the first time I play it I get the following error:

    Exception in callback: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> UnityEngine.MissingComponentException: There is no 'Camera' attached to the "Front" game object, but a script is trying to access it.
    You probably need to add a Camera to the game object "Front". Or your script needs to check if the component is attached before using it.

    Along with that, I also get a warning that states:

    Tried to unregister camera which hasn't been registered before.

    I have searched through my scripts and I'm pretty sure I have no script trying to access the camera through the "Front" gameObject (where Front is the image target I want to detect).

    What's interesting is that if I delete my ARCamera and simply Import a new one, I finally get my camera feed back as the background even in play mode. Then I save the project, close it, reopen it again and here's the error again and no video background.

    Does anyone know how to fix this so that it would work without having to delete my old ARCamera and import a new one every time?

    I am currently working on Unity 2019.2.3f1 and Vuforia 8.3.9.

    If you need any additional informations, let me know.
     
    rsy092736 likes this.