Graphic corruption after exiting my wp7 game - c#

I am making a videogame in xna for wp7 and I have a weird problem.
It turns out that whenever my game loses focus, for example:
open the web browser from my game
open marketplace from the game
close the game
when something of that happens the screen gets full of graphical artifacts and the device becomes unusable unless you go back to the game.
I discovered that if you maintain pressed the back button until the "background apps" is showed it works fine again. But my game won't pass the QA if this problem persists.
I've tried to comment the update and draw methods of my game but it still happens!! :S
Could anyone help please?

Well I fixed it.
It turns out that in a custom texture class, (I don't know why) there was code to create a Texture2D object with custom size. It worked fine (the game runs perfectly) but there is something that the device doesn't like and it corrupted the backbuffer.
What I've done is delete that code and instantiate the Textures always in their original sizes. Now it works great and no artifacts have been found :D

Related

Unity Webgl game never finishes loading.Browser tab freezes

I'm developing a quiz game and want it to run on browsers.So far the game only loads to about 90% of the progress bar, then the tab freezes. A browser warning shows up at the top saying that something is making the page slow. This happens both when the game is run locally or from a server.
The PC works fine and I wasn't able to find the problem so far. I tried playing wwith the build player configs and reducing all textre max sizes (solved the problem in this post https://forum.unity.com/threads/webgl-stuck-at-90-loading.532707/).
The last lines shown on the console before the load freezing are the json files readings. So I think it might have something to do with them.
If anyone has any idea it would be a great help.
You should also make sure that WebAssembly streaming is disabled in the player settings, that 100% causes webgl to get stuck at 90% loading.

Meta 2 with SteamVR; Cannot move around in Unity (nearly) frozen

I have a problem with the project I am working on in Unity and have been trying to solve the problem for days.
I am using the Meta 2 and the HTC Vive base station. I am continuing the work of a colleague. He was working on another computer. I am trying to recreate the project he created. He gave me the project and everything included but also doesn´t know how to solve my problem.
It looks like this:
I can open and play the project. When I play the project I can see everything I want to see in 3D with the Meta 2. But I can not look around. When I move the Meta I see the some kind of "vibrating" movement in the screen but in the end everything stays in the position.
I also connected the Sense Gloves I have with my computer. I can move the fingers of the sense gloves in the screen (they are shown as blue circles which i can move) BUT I cannot move the whole hand. It stays where it is initialized in the room.
I think it is a problem with the transfer of the vive tracking data to unity (the position of the tracker coordinate system in unity is not moving even though hit should).
I hope this explanation is accurate enough. If you need more information, do not hesitate to ask me, please.
Kind regards
Alex

SteamVR creating loading screen flicker when recording using FFMPEG in unity

I have a heatmap plugin integrated in my Unity VR game(with SteamVR). The plugin uses eye tracking information to generate live heatmaps as the user gazes at different elements in the game. As the heatmaps are generated, the whole camera view(user's) is overlayed with heatmaps info and written to a MP4 file using FFMPEG.
The whole process works fine. But I have an annoying problem where during the recording the user's camera view is not stable and keeps flickering and stops only when the recording is stopped. It interrupts the smooth flow of his game
For now, I've narrowed down the code which causes the trouble,
public void Write(byte[] data)
{
if (_subprocess == null) return;
_stdin.Write(data);
_stdin.Flush();
}
From my understanding, It is in this part of the code stdinput is invoked to write to the file system. So, I surmise that the problem must be with accessing the file system which in turn must have caused some time delay when each frame is written in the update method. Correct me if i am wrong here.
The loading screen which appears during every frame write looks something like above. It interrupts the smooth flow of the game and also makes the recording useless as the user keeps focusing on the flicker rather than the actual objects of interest. I would really be grateful if someone shows light on the issue here?
Accessing the file system always takes a huge amount of time. Try offloading that work to another thread or a Coroutine.

Blue screen appeared after Build & Run project in unity

So i made my first unity game. I run (play) the scene on unity every thing works fine. (no exceptions or error what so ever). Then i tried to Build & Run the project, but after launching the game, Unity splash screen appeared and than my screen was covered with complete blue screen. And nothing happens from there. Am i missing something?
Important points to know
My 2D game has no main menu options (start,restart,quit)
This is just a simple platformer game, i.e player run,jump on tiles,
collect coins e.t.c
I have not created any of splash screen in start of game
Do i need to write some code to make it build and run from exe? please help
This also happened with me when I started unity. I fixed this issue by adding a scene into my "Build settings" panel. Before that, Unity was loading from sample scene which happened to be blue. I had to unselect this sample scene, and select a new scene, to make it run from my saved scene.
If the "Game" pane still shows blue, check that one of the scenes listed in your "Build Settings" panel is selected in the "Project" pane.
This sounds like you need to set your canvas scaler to scale with screen size.
This happened to me after I tried to upgrade my version of Unity, the upgrade failed, and I had to revert to an old version.
Specifically, I had the change on a git branch and reverted all the files back to my master branch in git, but it did not revert the files in .gitignore.
I was finally able to fix this by closing Unity, deleting the Temp directory in the project, and restarting Unity. Came right back up. Note that I tried "Reimporting all assets" before and that did not solve it. I needed to delete Temp.

Can't run XNA APP

i'm getting started with XNA game development and tried to run tutorail app on http://create.msdn.com/downloads/?id=753&filename=Shooter_Project_Windows.zip, but when i run, this blue window appears insted of emulator
What's wrong?
There is no way to know what is wrong for sure without more info. The blue window you are seeing indicates that the project is running; it is just not displaying anything visible to you.
If I had to guess (and it's just a guess, but it's a common issue for these types of things), the issue is possibly that your camera is facing the wrong direction. Other potential problems include things like the clip planes being set incorrectly. You might also look at the console to see if something failed without crashing the program...if a mesh or something was supposed to be loaded, and failed for some reason, you might also not see anything.

Categories

Resources