Unity 3d scenes comes "gold" [duplicate] - unity3d

I completed Unity's roll-a-ball tutorial and it works fine. I changed a couple of materials to make it look better. I also added a C# script that should restart the level when the player falls off of the ground (I disables the walls). I am using Unity 5.5.
It initially looks like this:
But when I go off the edge and the level restarts, it looks like this:
It sometimes looks like this for a few seconds after opening unity when the editor is loading.
Here is the script:
using UnityEngine;
using System.Collections;
public class DeathTrigger : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnTriggerEnter (Collider other)
{
if (other.gameObject.CompareTag("Player"))
Application.LoadLevel(Application.loadedLevel);
}
}
Any ideas on what's causing this?

The colors and materials are loaded. This is a lighting problem because lighliting is still calculating in the background. This will likely occur in the Editor only. This should not happen in the build.
Depending on your Unity version, you can fix this by going to Windows --> Lighting --> Settings then go to the Scene tab. Scroll down and disable Auto Generate checkbox then click the Generate Lightning button.
For older version of Unity with no Auto Generate checkbox, see here.

After play with Lighting tools, only one thing should be change on Lighting Setting for every scene.
Window > Rendering > Lighting (Unity 2020)
Click at Environment Tab
At Environment Lighting, change Source from Skybox to Color.
Select white color from Ambient Color.
Done. Try test it.
Before
After

I found many solutions online but I was missing out a step, so I hope this helps.
Most solutions indicated to go to Windows->Lightning, then untick Auto and Click Generate Lighting. My problem was that while I was pressing the generate button I did not have all of my scenes loaded for preview (at least not the scene I had problems with), so it was only applying light generation to the loaded scenes. Make sure all scenes are loaded when generating the lights.

Try Clearing Baked Data if you are using unity version around 5.5
Go to Windows->Lightning->Untick Auto->Now Click dropdown arrow of Build Button which is near Auto(Check Box) -> Select Clear Baked Data.
Now try Your code which looks fine although SceneManager.LoadScene (1); is enough.
Also unloading the previous scene and setting new scene as active scene is a good practice.
This worked for me.

File > Build settings > player Settings > (on the left) Graphics > (Top-Right) gear icon > Reset

I'm a newbie and none of the advice on web helped me. However when I went to Window > Rendering > Lightning > scene tab; If "lightning setting" says “none”, click on it and choose “demo”- setting. Press “generate”.
So it seems like it was missing settings all together which made the scene go dark when loaded.

I encountered the exact same problem. What worked for me was to set Directional Light > Light > Mode to Realtime. (it was Baked, for some reason)
I hope this can help someone in the future.

Related

Light in the scene window got way brighter after upgrading to Unity 2018.2.18f1 but the game window shows light correctly

So I had a project that I created using unity 2017.3 now I decided to move to Unity 2018.2.18f1 and notice a very annoying problem that I can't seem to solve,
the lighting in the scene window got way too bright on the other hand in the game window even before hitting play it shows the correct light. here is an image of the issue:
I tried everything out there that worked on past versions with no results, trying removing auto generate and generating the lightmap manually, tried to change the reflection source from skybox to custom didn't work.
although in the game it self the light is correct so it didn't really break the project but it is really annoying designing levels this way
any insight on this would be great.
Sometimes, issues occur when upgrading a project to another Unity version. If the issue is related to lighting do the following in order:
1. Delete the lights in the current scene then create new lights. For some reason, there seems to be light issues carrying it's settings to the new Unity version and creating new lights usually fixes it.
2. Go to Windows --> Lighting --> Settings then go to the Scene tab. Scroll down and disable Auto Generate checkbox then click the Generate Lightning button.
3.Go to Assets --> Reimport All.
4. If everything above did not work, go your Project's Library folder then delete it. Restart Unity.

Unity Substances dipslay light in reverse

3d object in my last project do not work as i planed. To thing is, when i add point light which settings are here:
to the scene the sphere is illuminated the way i want. And here is how it looks like:
the main issue starts when i add the substance to the sphere and somehow my 3d-object is lighted from the other site. Here is how it looks like
The thing that bothers me is that when i create a new project evrything works the way is should.
So i thought that the problem is connected with light so i reset the lightning settings by
window -> lightining -> settings -> right click in right top corner-> reset
but it does nothing at all.
Any idea what i could have done wrong?
So everthing is connected to build settings. In the not working one "Android" build option is choosen and in the working one "PC MAC LINUX" option is choosen.

Where's the option "Scale In Lightmap" in unity 2017.3?

I cant find this option in Unity 2017.3
The Lightmapping Window has been removed. Although, you can still access the "Scale In Lightmap" option in Unity.
Select the GameObject. Go the MeshRender ----> Lightning then check the Lightmap Static checkbox. Lightmap Settings menu will appear under it and you can find "Scale In Lightmap" under it too.
If still confused, check the animated image below:
EDIT:
Everything mentioned above is still true in Unity 2017.3. There is only one more step to do. You must tick the static checkbox next to the name of the GameObject in order for the MeshRenderer Lightmap information to show in the MeshRenderer.
You must have installed TextMesh PRO, then you can delete the file called "TMP_MeshRendererEditor.cs" in your project. To restore all of them to their default state.
For those who are still not seeing the settings, make sure you've enabled Baked Global Illumination in the Lighting Setting tab (Window/Rendering/Lighting Settings). They only appeared for me after ticking it on and saving - easy to miss if you're using a different way to bake lightmaps than the built in baker.
(Unity 2019)

Scene gets darker after redirection Unity 3D [duplicate]

I completed Unity's roll-a-ball tutorial and it works fine. I changed a couple of materials to make it look better. I also added a C# script that should restart the level when the player falls off of the ground (I disables the walls). I am using Unity 5.5.
It initially looks like this:
But when I go off the edge and the level restarts, it looks like this:
It sometimes looks like this for a few seconds after opening unity when the editor is loading.
Here is the script:
using UnityEngine;
using System.Collections;
public class DeathTrigger : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnTriggerEnter (Collider other)
{
if (other.gameObject.CompareTag("Player"))
Application.LoadLevel(Application.loadedLevel);
}
}
Any ideas on what's causing this?
The colors and materials are loaded. This is a lighting problem because lighliting is still calculating in the background. This will likely occur in the Editor only. This should not happen in the build.
Depending on your Unity version, you can fix this by going to Windows --> Lighting --> Settings then go to the Scene tab. Scroll down and disable Auto Generate checkbox then click the Generate Lightning button.
For older version of Unity with no Auto Generate checkbox, see here.
After play with Lighting tools, only one thing should be change on Lighting Setting for every scene.
Window > Rendering > Lighting (Unity 2020)
Click at Environment Tab
At Environment Lighting, change Source from Skybox to Color.
Select white color from Ambient Color.
Done. Try test it.
Before
After
I found many solutions online but I was missing out a step, so I hope this helps.
Most solutions indicated to go to Windows->Lightning, then untick Auto and Click Generate Lighting. My problem was that while I was pressing the generate button I did not have all of my scenes loaded for preview (at least not the scene I had problems with), so it was only applying light generation to the loaded scenes. Make sure all scenes are loaded when generating the lights.
Try Clearing Baked Data if you are using unity version around 5.5
Go to Windows->Lightning->Untick Auto->Now Click dropdown arrow of Build Button which is near Auto(Check Box) -> Select Clear Baked Data.
Now try Your code which looks fine although SceneManager.LoadScene (1); is enough.
Also unloading the previous scene and setting new scene as active scene is a good practice.
This worked for me.
File > Build settings > player Settings > (on the left) Graphics > (Top-Right) gear icon > Reset
I'm a newbie and none of the advice on web helped me. However when I went to Window > Rendering > Lightning > scene tab; If "lightning setting" says “none”, click on it and choose “demo”- setting. Press “generate”.
So it seems like it was missing settings all together which made the scene go dark when loaded.
I encountered the exact same problem. What worked for me was to set Directional Light > Light > Mode to Realtime. (it was Baked, for some reason)
I hope this can help someone in the future.

Unity 5 - Scene darkens when switching scenes

Ok, here is a new issue.
I will attach 2 photos. (Note: this is a demo level)
The lighter image is the way the scene is supposed to look when it is loaded. And in fact, it will load that way when I go to the scene and run it in the editor.
But if I load the level using Application.LoadLevel, it loads as the darkened image. Even if I increase the intensity of the light, the level looks completely wrong.
This is happening for all my scenes, please help!
Go to Window -> Lighting.
Click on Scene tab.
At the bottom uncheck 'Continuous Baking' and press Build.
This solved the problem for me when using Application.LoadLevel();