Scene is darker when playing in editor [duplicate] - unity3d

This question already has answers here:
Objects in Scene dark after calling LoadScene/LoadLevel
(7 answers)
Closed 5 years ago.
I have a menu scene which goes to the game scene by calling SceneManager.LoadScene method.
Everything is alright when I build the game and play (or play in editor starting from the game scene).
But when I play the game in the editor (starting from the menu) the game scene is darker than usual.
That's not hurting me, but I'm curious to know the reason.
By the way, I have only the one default directional light which unity creates.
Screenshots:
Normal (Playing the game after build)
Darker (Playing the game in editor starting from the menu scene)

You have to disable the contious light baking.
In order to do so in Unity 2017.1, go to Window -> Lighting -> Settings and uncheck Auto Generate at the bottom of the window. Then, press Generate Lightning to bake the lighting once manually.
Note that if you add more lights or make some changes, you have to bake the lightmap again.

Related

How to fix not appearing lights in Unity?

Developing a simple zombie game with day-night cycle. So, for the player to handle the night, i am making a flashlight. Modeled it, and i need a real Unity light to make it a flashlight (but it's anyways flashlight, but broken..?). The light works neither in Scene or Game window. Here i'll show you some screenshots (and a test video):
I tried clearing cache, as i found on Internet, but it only worked until i switched tabs.
EDIT for #BugFinder [30.01.2023]
Light component for the flashlight:
Switching between Point and Spot light isn't doing anything.
Your light mode is currently set to Baked. This instructs Unity to prerender a static light when you press bake lighting in the lighting menu. Obviously you don't want something static for your flashlight, so change the mode to Realtime.

How Unity editor shows transform in scene

I'm creating a 2D game. It was configured as a 2D game since it was created.
When I selected a GameObject, in the scene their anchor, their size and their pivots were pointed out.
Suddenly this has changed, and it appears like if it were a 3D project, with a circle and all the axis around it, whatever GameObject I select. (Pic below)
How can I configure my Unity Editor to be like before? Maybe is worth it to say that in the top toolbar of Scene window there's still 2D mode selected:
Version: Unity 2018.3.14f1
You've set the Rotation Tool. I think you were using Move Tool before.
It's just a matter of which gizmo you see in the scene.
You may just press "W" on the keyboard.
Or press the Move Tool (first one in the images).
Further info on Unity Tools.

Shader showing as black from one scene to another

I have a small question on Unity. I have 2 scenes; one is a 'menu' with a simple button, and the other one is my scene with an object that has a custom terrain shader with it. You can see the code for the custom shader here:
Unity shader error, unrecognised identifier
For some reason, I am being presented with this situation where:
If Game scene is run in editor -> the shader is loaded
If Menu scene is run in editor and then go to Game scene -> the
shader is loaded
If Game scene is run after build -> the shader is loaded
If Menu scene is run after build and then go to game scene -> the
shader is NOT loaded
Any idea what is going on here?

Scene content is shown in game player but not shown in windows build

The scene content is shown in game player but not shown in windows build.
Could anyone suggest what can cause to this kind of problem, Or suggest ways to troubleshoot it?
Please note that :
The scene is properly defined in the build settings
I am using windows 10
I am building for windows
The scene contains some sprites with physics , an imported character with animations (I imported it from the asset store) , a UI canvas with a button, and some scripts that attached to the objects.
The scripts do almost nothing.
The game content is properly shown inside the game player (Unity's Editor player) the problem is only with the build.
When running the build output , Unity's splash screen is shown and then the scene is loaded but its content isn't shown.
I changed the camera background color , and the color is indeed changed in the build , it's just the scene content that isn't shown.
I added a UI canvas with a button , the button is shown.
I am using Unity 5.5.1f1
it is a 2d project
Make sure you are adding the scene to Scenes in Build screen.
Go to File->Build Settings and in the dialog make sure your scene has a check mark on the left.
When running in Editor Unity runs whatever scene you are working on, but when building a player you need to include the scene in the list.
Problem solved.
I deleted the camera and created a new one. It solved the problem.

Using LoadLevel has effect on light [duplicate]

This question already has answers here:
Objects in Scene dark after calling LoadScene/LoadLevel
(7 answers)
Closed 5 years ago.
I am making a simple orthographic game in Unity, where the player has to shove a puzzle to open a door leading to the next room. The problem is, that when I enter the door, and the next scene is loaded using LoadLevel(), the light gets darker than it would normally be. This does not happen if I edit the scene inside Unity and start testing from there. I am wondering what happens, and how to fix it. I have even made a prefab of the Directional Light that lights up the scene to make sure they are equal, but that has no effect. How do I fix this?
This is normal. It happens in the Editor only and also when Continuous Baking is enabled. This will not be present when you build your project.
To fix this in the Editor, Window -> Lighting -> Lightmap Tab -> Disable Continuous Baking then click on the Build button to bake the lighting.
If using Unity 5.4, the settings changed a little bit Window -> Lighting -> Lightmap Tab -> uncheck Auto checkbox. Click on the Build button to bake the lighting.
If you move, remove or add objects in the Editor, you must rebake/build lightmaps again.
EDIT:
This has been renamed to Auto-Generate. See duplicate for new answer. This answer will remain for older version of Unity.