Search Unity

Do not run Vufory when the application starts

Discussion in 'Vuforia' started by Ark_Tarusov, Oct 2, 2017.

  1. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,496
    Yes in the end I put the AR camera etc. in a new scene and then just load that when I need it. That seemed to be the best way to get it to work.
     
  2. atorisa

    atorisa

    Joined:
    Dec 1, 2013
    Posts:
    122
    Download the latest version of Unity.
     
  3. aashwina_unity

    aashwina_unity

    Joined:
    Aug 28, 2018
    Posts:
    5
    Can someone confirm if the vuforia cannot be used before its initialized error (resulting in a black screen ) is fixed in 7.2 ( or whichever version comes with Unity 2018.x ? I reverted to using 6.x and I had to make the changes people had suggested here i.e add the 1. VuforiaBehavior script to all scenes that were non Vuforia and turn it off. 2 .Enable delayed init on the whole project. 3. InitVuforia on the camera in a Vuforia scene and uninit ( add this script ) when exiting . This worked. Worried about moving to 7.2 in case this doesn't work.
     
  4. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,496
    I'm using 7.5.26 with Unity 2018.2.10f1 and not having any issues with black screens.
    Had a few other issues but worked around them.
     
  5. anthodb

    anthodb

    Joined:
    Sep 6, 2012
    Posts:
    13
    Still having this ****** crazy issue..
    Unity 2018.2.17f1
    Vuforia 7.5.26

    Whenever I unload the "Vuforia scene" with the AR part of the app, it automatically adds the VuforiaBehaviour to the first camera available... and then :

    It's not possible to have two ARCameras at the same time

    Please Vuforia Team, fix this !!!!
     
  6. anthodb

    anthodb

    Joined:
    Sep 6, 2012
    Posts:
    13
  7. julietpacheco

    julietpacheco

    Joined:
    May 13, 2019
    Posts:
    1
    Hola
    espero me puedan ayudar lo que sucede es que tengo el modelo de una casa completo y necesito que en la realidad aumentada salga solo una habitación de la casa, yo acomodo la ar cámara para que se;ale solo esa parte de la habitación pero al hacerle la realidad aumentada me sale toda la casa entonces como puedo hacer para que solo salga la habitación en la realidad aumentada ?????
     
  8. giuseppescavo

    giuseppescavo

    Joined:
    Sep 4, 2017
    Posts:
    2
    Hello everyone,

    I'm working on a project using Unity 2019.1.8 and Vuforia 8.3.8 and this is still an issue. It's been 2+ years since this thread was started and many devs have complained about this. What should the community do to get this sorted?

    Please, we DO NOT want to add a Vuforia Behaviour every scene on every camera, independently from their tag, size, ethnicity, religion... We DO NOT want to find tricky workarounds that screw the rest of our logic just to cater for an issue that can be sorted with a little effort on your side. We DO NOT want to find another AR SDK for our projects.
     
  9. TomsDC

    TomsDC

    Joined:
    Apr 25, 2017
    Posts:
    5
    Forget trying most of the things posted on this thread and go look at this: https://stackoverflow.com/questions/47000398/how-to-stop-vuforia-behaviour/50570891

    You want the post by 'Joeri Van den Eynden'. I'm using Unity 2019.1.8 along with Vuforia 8.3.8 and the 2018 version of the fix on that link works perfectly for me. It forcibly removes the 'AttachVuforiaToMainCamera' method from the SceneManager.sceneLoaded event. This pretty much goes right into the heart of Vuforia's code and stops the whole automatic adding of Vuforia components to any Camera in any scene.

    I've been using Vuforia for almost six years now, and this bug is a really annoying one for me. I'm not posting up comments as someone who is new to Vuforia. I have quite a lot of experience in using it, to the point, in fact, where a guide I wrote on the basics of using Vuforia in Unity was posted on Unity Connect, found here: https://connect.unity.com/p/draw-and-code-best-practices-for-vuforia-ar-targets-in-unity *

    I mean, seriously, I posted about this in November 2017 on this thread and you still haven't improved that part of your codebase Vuforia? If there are bugs and problems with your code I get it, users creating their own fixes whilst you get around to doing a proper fix yourselves is acceptable, but not improving your code at all or changing your code and still having the same issue after all this time? That isn't acceptable. There are other ways of ensuring that an ARCamera exists where it is needed. Do we have to code the solution for you in order to implement it? **

    * The guide I wrote was originally written for the studio Draw and Code.
    ** I'm a freelancer and all the views expressed here are my own, but I'm pretty sure many people share them who use Vuforia ;)
     
    Last edited: Aug 19, 2019
  10. ptc-pmessenger

    ptc-pmessenger

    Joined:
    Jan 17, 2017
    Posts:
    3
    TomsDC, what's the exact issue you're working around? You have multiple cameras in the scene, you have Vuforia Scripts in the scene, and yet you don't want to have an ARCamera in the scene? What are you trying to achieve?

    1. If you don't have any Vuforia objects in the scene, an ARCamera will never be attached.
    2. If you want an ARCamera and multiple other cameras, explicitly add an ARCamera to the scene so Vuforia doesn't attach one to the first camera in the scene.
    3. If you want to work with a single scene, but want the ARCamera to be disabled on start, add an ARCamera to the scene and handle it's enabled state via code. There's also the option of creating a "start" screen w/o Vuforia and loading your AR scene later.

    Also, by default the ARCamera is attached to the camera with the "main" tag first, if not, it takes first it finds. This is mainly done to make it easier for developers to get started by simply adding a target to the scene and hitting play.
    For more fine-grained control, you can add the ARCamera object to the scene and manage it from code as described above.

    I'm interested in knowing which problem you're having which is not covered by the solutions above.
     
  11. TomsDC

    TomsDC

    Joined:
    Apr 25, 2017
    Posts:
    5
    I was commenting mainly to help Giuseppe as we are currently working on the same project, but was frustrated to see that this behaviour of automatically adding Vuforia Camera components automatically had not yet been removed.

    I'll try and get Giuseppe to comment tomorrow and give you the details on the way he was additively loading scenes. There was an ARCamera in one scene, and then when he additively loaded another then the camera in this new scene, which wasn't an ARCamera, was having Vuforia components added to it, even though an ARCamera already existed in the initial scene. Or at least I think that was the setup. Like I said, I'll try and get him to comment and give you details tomorrow so you can replicate and test issue.