Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unity crashes when using webcam in Editor Play mode

Discussion in 'Editor & General Support' started by felipedejesus145, May 28, 2014.

  1. felipedejesus145

    felipedejesus145

    Joined:
    Nov 22, 2012
    Posts:
    7
    Hi there,
    Im using Unity Pro 30 day trial, im developing with Vuforia, and everything runs great so far in my Android Samsung Galaxy 4 mini device.
    But when I want to use the webcam for testing it in Unity's Editor, I hit the Play button and after a few seconds it crashes. Just shows "Unity stopped working" and shuts down. Im using Micsrosoft LifeCam VX-5000 webcam, I created a new profile for it in the profile.xml, but didnt help. Is there something else that needs to be configured and Im missing it?
    Thanks!
     
  2. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    It's worth looking at the editor log to see if it gives any insight into what caused the crash. Failing that, maybe try a new project which just has a webcam-textured cube?
     
  3. felipedejesus145

    felipedejesus145

    Joined:
    Nov 22, 2012
    Posts:
    7
    hi there, thanks for answering.
    I took a look at the Editor's Log but as a new Vuforia user, I cannot spot anything I can solve. The bottom lines doesn't seem to throw an error, but there is a line:
    "Can't add component because class 'PremiumComponentFactoryStarterBehaviour' doesn't exist!"
    I don't know if it is important.

    I tried importing an ARCamera in a new scene, with only a cube, and Unity crashed again.
    Thanks for the support!
     
  4. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    I'm not a Vuforia user, so don't know what you need to do. My advice was to try a simple Unity-only project using a WebCamTexture, which would at least confirm your webcam, drivers, Unity, etc work together.
     
  5. felipedejesus145

    felipedejesus145

    Joined:
    Nov 22, 2012
    Posts:
    7
    no problem, thanks for the support, im still doing tests, no luck. Will post any solution if I come with one. Thanks!
     
  6. pnacmd

    pnacmd

    Joined:
    Oct 9, 2019
    Posts:
    3
    Im new to unity, and this thread looks to be already 5 years old....Did you ever figure out the issue? I'm having the same problem. I can build the AR app fine and everything exports and works perfectly, HOWEVER, when I attach my webcam and click to view in play mode, Unity crashes. It was working fine on a laptop
     
    Last edited: Oct 12, 2019
  7. felipedejesus145

    felipedejesus145

    Joined:
    Nov 22, 2012
    Posts:
    7
    hey, very old post. I remember in the end i had to change the Camera to a different one. There was a "recommended devices" in a Vuforia post, but I can't find it anymore.
     
  8. pnacmd

    pnacmd

    Joined:
    Oct 9, 2019
    Posts:
    3
    Thanks for the reply! After digging a bit deeper and testing on different machines, it turned out that the webcam was the straw that broke the camels back...my old machine just couldn't take any more thinking. lol. I ended up upgrading my whole system and everything works great now. Thanks again!