[SOLVED]Problems With Lighting After Loading a Level

Updated on August 9, 2016 in [A] Shaders
Share on Facebook0Tweet about this on Twitter0Share on Google+0Share on Reddit0
10 on August 7, 2016

Hello,

I’m having a problem with when I load a level. I created a pause menu and one of the buttons allows you to restart the level. Here’s the script I used:

 #pragma strict
 function RestartGamePls ()
 {
 Debug.Log("Game is restarting!");
 Application.LoadLevel("Level01");
 }
 

The problems is that when I press the button, it loads the level again, but the lighting is all messed up. What am I doing wrong?

  • Liked by
Reply
5 on August 7, 2016

I would upload pictures showing what it looks like, but for some reason it won’t let me.

Master
on August 7, 2016

I don’t think this is a problem but it’s because the auto bake option is turned on. Meaning that it doesn’t actually bake the new loaded scene in the editors play mode and you shouldn’t see this when building the game

on August 7, 2016

How do I fix it?

Master
on August 7, 2016

I thought you could change this by going to Window->Lighting and then turning auto bake off. This would mean you’d have to bake the scenes yourself. As for calling it a way to “fix it” isn’t really the way to call it since it isn’t really an error :)

on August 8, 2016

Just one more question: How do you bake a scene?

Master
on August 8, 2016

In the same window where you are able to turn auto bake off there should be a bake button.

P.S. you could have found some things yourself by doing researching, so do that the next time :)

Show more replies
  • Liked by
Reply
Cancel
1 on August 8, 2016

Pengalo, This is a bug. not all users have this bug. But if you export you game to PC or Browser you will not see it.
So, just ignore it and complete you game.

on August 8, 2016

Ah, okay. Thank you!

Show more replies
  • Liked by
Reply
Cancel
1 on August 9, 2016
Application.LoadLevel("Level01");

isnt better to use scenemanager?

Master
on August 9, 2016

Well it’s indeed probably better if you get into it since the other way is obsolete and might be delete in a coming version of Unity. Is better? I don’t think so but you should probably use it yes

Show more replies
  • Liked by
Reply
Cancel