Unity - Stop When Building - unity3d

I have finished my game in Unity already.
But whenever I'm trying to build the game, it stops at the point as shown below. Does anyone know the reason why it happens? It always stops at the same point....

It's a problem with baking the lightmaps on your scene.
Unity doesn't like huge objects when it comes to baking lightmaps on them and it can certainly kill the light transport on a build.
You can try to open the Window menu from the main Unity menubar and search for the "Continues baking" checkbox under Lightning and uncheck it.
Or you can just split your bigger objects on your scene which may cause this problem.
Here's a thread detailing the issue a bit.
I've also seen people working around this problem by disabling Global Illumination altogether so that may be a solution for you as well if you are using it and you are willing to give up on that feature.
Edit: Another thread about this sort of thing with a decent solution - not sure why I didn't remember it for first but it's a good idea before trying to split your huge objects to mess with their "Scale In Lightmap" property as well to reduce the lightmaps' size.
You can also try the "Advanced Parameter" options.

Related

Pink/Blue Tint on Build Unity URP Post-Processing Bloom

pink build
blue build
To preface this, we are using Unity 2019.3.0f6 and URP 7.2.1.
About 1/3 of the time we load a scene of our game (in build only) it is tinted pink with an orange strip at the top (pictured in “pink build”) or blue with a green strip at the top (pictured in “blue build”), until you enter the next scene. The other 2/3 of the time the screen is fine.
After looking through the shader compilation in the log, it appears that all of them are loading (nothing in the output changes between when pink/blue build happens and when it doesn’t). We then tried turning on and off different components on the camera just to isolate what might be causing the problem, (as the tint effect only happens below the Unity canvas so we thought it might be a problem with the camera/postprocessing).
We’ve narrowed the problem down to the Bloom Override on our Volume Profile on the Volume Component for Post Processing. Turning off the Bloom Override makes the problem go away in build, but we would like to keep the Bloom effect.
the volume component
We’ve tried printing all of the values under the Bloom Override to see if there is an anomaly when it does the pink/blue v.s. when it doesn’t, but there is no difference. Literally nothing is different in our logs when it works and doesn’t work. The only thing we know for sure is that turning off the Bloom fixes the problem. If anybody has run into this, this is a desperate call for help, because we have absolutely no idea where to go from here.
graphics settings screenshot 1
graphics settings screenshot 2
This is probably, a rather individual problem. Since people with a similar problem have not yet answered, I will advise a general and simple solution. Create a new project, where there will be new settings URP, and already add a bloom effect in it. If everything works well and bloom works, then transfer these settings to your project (preferably create a backup, just in case).
If that doesn't help, then as an option, try changing other settings that appear before 2/3 of the game works well. Maybe it's some individual effects, that create a problem. Or according to my assumptions, in a vignette. It can also be in a sprite, that is drawn on top of the bloom (It is advisable to do all this, in a separate backup, so as not to accidentally break the project). Also, the problem may be in the camera, if the URP settings, sprites, etc. work well, and the bloom effect should not fail.
As a last resort, if this also does not work, then try to send a complaint to Unity support. There is a possibility, that this may be a mistake in the bloom effect itself.
Although I will assume that bloom removes the problem. But the error is in something else, and is displayed at the moment when the bloom effect is turned on. But since the URP is quite new, I do not exclude that this is a mistake of the bloom effect itself.
I had a similar problem in the past, it fixed by changing LUT size to (16 or 32 or 64...), in urp asset settings/ post-processing.

Some parts of the Scene View don't seem to render

I am making a 3D game in the Unity Editor. When I started making the project 2 days ago, everything was fine until now. My issue cannot be described, but I can share the images of what happens in the Scene View as I get closer to objects:
Here is when I am a bit far from objects. You can see the gray part starting to pop out from the bottom:
Here is the image as I get closer to the objects:
As soon as get very close, you can see the objects disappearing. 2 of the 4 boxes are not visible completely, 1 is a bit out of render, and the capsule(the player) is completely invisible:
This has suddenly started to appear on my Unity Editor. Please help. I don't know if this is a bug or I am doing something wrong, or any setting is incorrectly set.
Ps:- Please do comment if you require any of my scripts or any other details. I don't ask questions very often so I don't have much idea as to what kind of information is required.
To everyone seeing this in the future, here is a very simple solution to the problem, if you face any issues.
I have tried, and you can try the following steps as well.
1)When in the Scene View in Editor, click on the small camera icon on top of the Scene View Window and uncheck the option Dynamic Clipping. This should solve your issue.
2)Although this has nothing to do with the problem, however, there is a chance it is an Editor Bug, so I recommend updating your Editor to the latest version, to see if it fixes the issue.

Editor Loop delay. Is it a problem for my game?

I'm new on that thing of analisys profile of Unity. I decided to see if my player is dropping too much FPS and the I found this. Will that be a problem for my game? I don't know how that system works, but I guess 8.35 is a high number...
Not its not.
The editor loop is how long the unity editor took.
The player loop is (roughly) the performance of your game. And the big green part looks like the WaitForTargetFPS call to me. Though to tell for sure you'd have to expand the player loop and see.
If you want to measure the actual performance of your game accurately you have to make a development build and profile that one (you can select the debugging options for this in the build dialog).
Further reading: profiler documentation

Unity profiler Device.present

When trying to optimize my game the biggest problem seems to be the device.present. Been going through some forums and i couldnt really find any useful answers. What is usually the main problem associated with this?
There are just many things that could cause this but the main reason is because the Thread is blocked by the graphics driver in a way to let the GPU catch up.
These are the specific reasons:
1.Image Effects
Check your camera. If you have Image Effects such as Flare Layer, Anti-aliasing and others, disable them.
2.UI Effects
Check all your Images, RawImages and Texts. If you have an Outline, Shadow or Position As UV1 component attached to the Images, RawImages and Texts, this could cause the problem. Usually when you have multiple of this attached to one
Image, RawImage and Text.
3.Bad Light Settings
Select your light and make sure that the Resolution under the Shadow Type is not set to Very High Resolution.
4.In the Quality Setting change the V Sync Count to Don't Sync.
5.Check for Sprites and Images with 0 alpha then disabled them
6.From the Player Settings, disable Auto Graphics API then change the Graphics API to OpenGLES2.
7.Custom Shaders
Are you using custom shaders (non standard shaders)? Disable it temporary. An expensive or bad written shaders could cause this problem.
Those are the usual problems. It is very possible that yours is a different problem. I suggest you enable/disable items one by one and you will likely find the problem.
If not, then consider creating new project and scene. Save out your old game as prefabs or assets then import them one by one into the new project. Don't import them at the-same time because the problem might appear again. Import then test then import again and test until you find the problem. If the problem is no longer there then it's likely an Editor Settings problem.

Unity 3D Undoes changes that I've made

I'm a newcomer to Unity3D development, and, while following a tutorial to make my first game, I noticed that a few steps I kept repeating as I flipped between the Unity application and my browser (chrome), which were both in full screen, certain steps that I had made would occasionally be reversed when I returned.
The two times I noticed it happening, GUISkins and Scripts that I'd added to game objects had been removed.
Has anyone had a similar problem? To prevent this, do I save the scene or the project? Does Unity offer some sort of Autosave function?
Thanks in advance :)
The changes made to the scene while the game is in play mode will not persist. Once you get out of the play mode, the changes made will be reverted.