I've got a problem with screen loading issue in iOS build, It works well in Android but the same build is not working properly in iOS.
While loading to the other screen sometimes it takes time to load and sometimes it may crash with an error in Xcode console.
iOS Console Error: "Execution of the command buffer was aborted due to an error during execution. Ignored (for causing prior/excessive GPU errors) (IOAF code 4)".
I wrote this code in my game manager script for loading the screen.
AsyncOperation asyncOperationScene = SceneManager.LoadSceneAsync("level"+ (DataManager.levelNumber + 1), LoadSceneMode.Additive);
loadingPanel.GetComponent<LoadingLevels>().async = asyncOperationScene;
loadingPanel.SetActive(true);
asyncOperationScene.completed += AsyncOperationScene_completed;
If someone could enlighten me I would really appreciate it!
Thanks for your time!
After search some on the internet, maybe your problem is not related to the loading way of the scene, but the scene has some problems with lighting or shader, I have read about some other guys have a similar problem and is related to some drivers of new phones that have changed and then unity it's working with it, but it also has to do with custom shader things that need to be different, so maybe your error doesn't come from the loading way of the scene, but from some material, I have read that it can be something about ambient lighting and exr. files, wish to help more but that's was what I can share with you.
Anyways would be nice for all of us that you share here the debug log where we can see what's going on and particular to you make sure that is not about loading the scene but something that the scene you try to load had something that its not well for this new phones and their driver related to lightmapping shaders etc.
Thanks for your response, In my script I added some other functions as well like clear cache memories once I commented those code for cache memory then the scene loading issues resolved.
Let me show you my codes, Someone please go through it and do let me know whether it is correct or having some mistakes on it.
void ClearMemory()
{
MediaPlayer[] ar_mp = FindObjectsOfType<MediaPlayer>();
foreach (MediaPlayer mp in ar_mp)
{
mp.CloseVideo();
}
Caching.ClearCache();
Resources.UnloadUnusedAssets();
GL.Clear(true, true, Color.green);
GL.Flush();
}
Related
I am building my first game in android. When I play in the editor everything works fine, but when I build and run I get huge lag to the point where it is unplayable. I have attached the profiler and it looks like this:
Does anyone have any suggestions on how to fix this please?
In my case it was due to Multithread Rendering. After disabling Multithread Rendering in Player settings a Semaphore.waitForSignal not appeared in profiler anymore.
By the way it doens't fixed the issue with CPU performance and enabling such option looks reasonable for devices with multiple or advanced (more than 1 thread) cores. But at least it helped to face with another errors for investigation the root cause ^^
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.
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.
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
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.