Unity: Disabling OptimizedFramePacing fixes Bluestacks blackscreen but cuases jitter - unity3d

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.

Related

Unity exported game : VSync issue

I'm making a game in Unity, the project was doing fine but I wanted to create a build of the game just to see how it goes and it seems that there is a little vsync problem on the build which was not visible in the unity editor.
Here is a video that shows the problem :
https://youtube.com/shorts/JCzZcsVj3t0?feature=share
I've tried to run the game on an external screen (144Hz), but I don't know why, the problem is not visible at all !?!!
Maybe the problem is on my laptop's screen (60Hz), but as I said in the beginning, this vsync problem does not appear in the editor (also not in "real" games).
My pc is a HP Victus 16, does anybody knows what's happenig ?
Edit : I've tried to record a video from the laptop itself (which corresponds to the screen with the problem) but the problem is not visible on the recorded video ...
Thanks :D !
I've found a solution but I don't know why it works ...
I've changed the default rendering pipeline to HDRP and the problem is gone, there is no more VSync problem.

Unity Graphical Editor is broken

The white part sometimes grabs onto colors underneath, and I can't click on anything but the toolbars, where all the subwindows also have the same problem
I have suspicions that it is a problem with my NVidia GeForce, but I've tried going as far as uninstalling unity, manually deleting everything unity related and reinstalling and the glitch still exists.
That seems like a problem caused by old DirectX.
I had the same problem with 2018, and I fixed it on Win7 by installing the KB2670838 update. However, I can see you're using Win10, so this specific upgrade isn't available to you.
To be sure that it's not a problem of Unity, try launching it with the following command line arguments: -force -glcore and see if you have the same glitch when using OpenGL.
If not, I suggest you try to update the nVidia drivers to the latest version, and check if you have the latest version of DX12 on your OS.
If the problem persists, I suggest you contact directly someone at Unity.
The problem was the screen size. My screen was blown up by 25% change it in the display settings.

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

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.

Unity 3D: Rear camera in device is behaving weird

Am working on taking snap from my device camera. The front camera is working good,but the rear camera is not upto the mark. It is showing upside down. I donno why it is behaving strange.
Can anyone help me out.
Cheers!!
It's difficult to come up with a simple answer for your problem, this depends on wether you run it on iOS and Android. In general you need to adjust ( rotate and flip ) the resulting image based on the mirror and rotate value in the WebCamTexture.
There is a toolkit available that help you with solving some of these issues that you can take a look at. It's called Camera Capture Kit and is available on the assetstore ( https://www.assetstore.unity3d.com/en/#!/content/56673 ) - since the source is included for both iOS and Android it might be a good foundation for helping you tweak and solve your issue in your game or maybe it will just be a plug'n'play solution for your needs. It might let you save literally weeks in the long run since there is a lot of tweaking to get camera capturing right in Unity. Furthermore there is a functionality available to enable and disable flash light which might come in handy as well.
There is also a demo app included which is quite similar to what you have already been doing on your screens.
Cheers!

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