why does the screen on my phone turns white when it detects the target? - unity3d

I'm new to augmented reality, and I'm using vuforia 4.2.3 and unity 5, I followed all the steps trying to make a test run and whenever the camera detects the target the whole screen turn white, I've tried many thing but none of them worked, can someone help me?

I had a problem that sounds similar.
There is a known bug that causes white screen, could be related to that? See here for more info.
What worked for me was to change the VideoBackground.shader code, as described on that thread.
Go to Project>>Qualcomm Augmented reality>>Shaders
Double-click VideoBackground. This opens up Mono.
In the code, change where it says:
"queue"="geometry-11"
to this:
"queue"="Geometry"
Save, rebuild etc.
Worked for me.

Related

Touch is not working with Unity UI Toolkit buttons

I'm having a weird issue, may be a simple fix.
I've got a UI only "game" using the new UI Toolkit. It's a little kind of a drawing program. I've got a draw area in the middle with "tool buttons" on the sides. Everything works fine with Mouse, Pen, and touch when drawing (using scripts I can access all types of pointers), but for some reason touch doesn't work with the UI buttons only.
What's even weirder is that touch on UI buttons works when testing directly in Unity Play mode (I've got a touch screen laptop), but doesn't work when I make a Build.
In my Project Settings -> Input System Package, I've got Pen, Mouse, and Touchscreen active under "Supported Devices"
The new UI Toolkit is so new there's no help or similar issues I can find online.
if its still relevant:
I had the same issue and used "Standalone Input Module" instead of "Input System UI Input Module" in EventSystem. It says it's the old option, but it works for me :D
I add the touch screen here and it works now.
Just a follow up since I ended up finding my answer somewhere else.
In the "Input System UI Input Module" component in the EventSystem, I changed the "pointer Behavior" to "Single Unified Pointer" and that fixed it. Not sure if that's just a work-around, but it works great now.

Unity: Disabling OptimizedFramePacing fixes Bluestacks blackscreen but cuases jitter

The Problem: when running a unity build in Bluestacks you get a black screen. The only solution I have found for it is to disable "OptimzedFramePacing" in PayerSettings when building which fixes the blackscreen, but causes another problem, which is: on android your game gets a little jittery.
I use unity 2020.3.33f1. tested on Bluestacks 5.3 and 5.8
I have tried with empty project with only a few rigidbody2d falling and result is the same.
in the last few days i have searched and read all the topics about this, which are very few considering it looks like a big issue!
Things I have tried but failed:
-fixing bluestack black screen by any other ways. (blitType, Custom main manifest, Changing Graphic API)
-changing OptimzedFramePacing only if we run in bluestack, which is impossible because OptimzedFramePacing can not be set at runtime.
I know OptimzedFramePacing=false should result in a little jitter. is there a way to fix bluestacks blackscreen and keep OptimzedFramePacing=true?
or any other solution?
I really appreciate if anyone can help me with this.
Thank you.

Built game looks duller than what is seen in the editor

I built my unity game through Xcode into an iOS device for testing, and the colors look duller and more pastel-like than in the game view in the editor. The exact same thing has also happened on a modern android device. How can I make it so that the colors as seen in the built game better reflect the colors in the editor?
EDIT: I have sent a file to my phone and found out that the phone perceives colors differently than my monitor. I'm sorry if I'm asking for quite a bit here, but... is there any way to make the game look as I intend it to? The fact that I never see exactly how my game will turn out seems kinda... awkward. Thanks.
I'm not sure if you already tried this, but you might want to use Unity Remote for your iOS device, so you can check the color differences in real time instead of having to build it every time.
But other than what the comments said, it sounds like you should try to adjust your monitor's display settings for better color correlation between the built game and the one in the editor.

Unity3D - Button Only Works Once?

This is super strange. This simple button is not clickable at all. But when I close the Unity and Mono editors and fire it up again, it will work - only once. I mean, the second time you hit the play button, the button will not work anymore. I didn't change settings of the button or the canvas. I just put them in the scene and click play button. I think this is a bug? But there's no log i can see. This is bugging me for good 30 mins. I even restarted my PC and still working only on the first hit of play button. Thanks
EDIT: just found the problem. This problem occurs when you use the Unity Remote app on Android. It will work first. But when you try it the second time, buttons are not responding anymore. The only solution I found for this is to reinstall the Unity. Tried restarting PC but didn't work. Soo, peace out. Thanks
Try to turn on the Force Module Active property on inspector in EventSystem. I had the same problem on Version 5.3.1 on my machine (macbook pro mid 2010 on OSX El Capitan). Deleted the Unity, rolled back to 5.2.2, upgrade to 5.3.3, the problem is still there. Did that and somehow it works, but I don't know the reason why

OpenGL ES sprites no longer render after updating to iOS 7.1

I am using a simple 2D sprite class based on this tutorial to render PNG bitmaps to the screen:
http://www.raywenderlich.com/9743/how-to-create-a-simple-2d-iphone-game-with-opengl-es-2-0-and-glkit-part-1
Everything worked fine on both my iPhone 4S running iOS 6.1 and my iPhone 5S running iOS 7. Since I updated to iOS 7.1, and on my MacBook Air updated to Mavericks and XCode 5.1, sprites no longer appear on the screen (I just get an empty white screen, which is the color I cleared the background to). When I build the app using XCode 5.1 and run on my iPhone 4S again, it still works.
Does anyone know what could be causing this? Has anyone run into this issue? I am having trouble getting to the source of the problem due to my lack of understanding of OpenGL ES among other things. :) My sprite class is exactly the same as the one in the tutorial.
Let me know if more details/code snippets are required.
I'm not even going to look at the sample code since it doesn't sound like it's the same as your current code. (You said 'based on'.) But I'll tell you how to find your problem.
First, clear to something other than white (like red) as a test.
If the screen turns red you at least know that your view and context and open gl in general is working. That knocks out a lot of possible culprits.
Second.. use the debug tools and chances are it will take you right to your problem. You have to run on a tethered device though and not the sim. Run your app...
Click on FPS in the debug navigator. Then click analyze and be patient. It will take a one frame snapshot of whats happening in open gl. It has to do a bunch of stuff to make that happen and it takes about 30 seconds. But then you'll have an interactive thing that shows you the frame and will let you step through processes and see what code is making that happen, and the frame as it draws each element. It's super cool actually. And probably it will show you an error message (in red).
My guess is that it's no longer loading your sprite images. Something probably changed between 6 and 7 or the versions of Xcode or of OSX. In that case the screen is blank because they're not loaded and therefore not being drawn.
EDIT:
I think the analysis will help find your problem. But to offer more possibilities, in my experience when nothing is drawing it's often one of these things:
An overall OpenGL issue - set your clear color to red or blue to test.
Shader didn't compile - always output shader compile errors so you know.
Bad Shader math or logic - use gl_FragColor = vec4(0.0,0.0,1.0,1.0) or some contrasting color to test. Can you see your structures?
Program isn't getting an attribute. Did you remember glEnableVertexAttribArray
Program isn't getting a uniform. Use the Analyze feature above to check the uniform values to make sure they made it to the shader.
(i'll add more if I think of them)
When stuff does