1

I am using Vuforia 4-2-3, the latest NGUI verion and Unity5.0.1.p3 My GUI works fine until I track a target. After that, my GUI is invisible However, the collision still works. So buttons are working, only I can't see sprites, textures or labels.

There is a 3D building that shows up while tracking. That 3D object uses the standard shader. The NGUI atlas uses the unlit/transparend colored shader.

I guess there is a conflict between those? Did someone else had this problem before?

EDIT: This is what my hierarchy looks like

enter image description here

I have an Image Target with several 3D objects. The NGUI and the ARCamera are two different objects aswell.

This is what my NGUI looks like, when I start tracking enter image description here

Jenny
  • 469
  • 2
  • 11
  • 25
  • It is hard to know without knowing the setup details about GUI and cameras, please provide screenshots and more info. Make sure to do not render the GUI layer in the AR camera, and only render the GUI layer with the UI camera. Also, maybe this question is a bit more proper on the Unity forum that in SO. – VicM May 12 '15 at 14:36

1 Answers1

0

Where have you linked your NGUI to? The ARCamera or another GameObject?

I would suggest you link your script to the ARCamera at all times. This would ensure that it shows, since a GameObject below the ARCamera it might not show since the hierarchy pattern to be followed by general Unity users.

EDIT: If you've used OnGUI() for your GUI needs, then the script in which its contained should be attached as a script on the ARCamera. Also, try putting ARCamera on top of Image Target in the Heirarchy.

Augmented Jacob
  • 1,567
  • 19
  • 45
  • I've added two pictures to my question. My NGUI and ARCamera are two different objects. And my Image Targets are also different objects. I don't really understand what you mean?! – Jenny May 21 '15 at 15:01
  • 1
    I am using NGUI not unitys GUI. I figured out that it is a bug from unity. You can find the problem here. https://developer.vuforia.com/forum/unity-3-extension-technical-discussion/vuforia-42-unity-501-ui-issue#comment-2050411 So if I change the videobackground shader it works, but than my transparent shadow shader won't work anymore. I have a plane underneath my object to show the shadows. But my plane is now black after I change the videobackground shader. I fixes the NGUI problem but now I get another one. – Jenny May 22 '15 at 09:09