playMaker

Author Topic: Reset Changes Lights? [SOLVED]  (Read 3611 times)

mTruly

  • Junior Playmaker
  • **
  • Posts: 98
Reset Changes Lights? [SOLVED]
« on: March 04, 2016, 09:09:32 AM »
I have a very simple scene with one Directional light and 2 cubes.  I have a RESET button that uses the Reset Level action.  This seems to work great to reset the level to the beginning.

But when I do a reset... the resulting image onscreen is different than it was at the start of the game.  And it seems to be the light that is somehow different.

For example, at the start of the game you see 2 cubes side by side.  You are seeing the dark side of the cubes but there seems to be some ambient light so the dark area is not black.  But when a reset is done... this dark area of the cubes is totally black.

I don't do anything to the single light.  No animation, etc.  The light parameters don't seem to have changed.

Any idea why this is happening?

Thanks!
« Last Edit: March 04, 2016, 02:20:14 PM by mTruly »

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Reset Changes Lights?
« Reply #1 on: March 04, 2016, 09:55:12 AM »
Have never seen that happen before- could be the "clear flags" and "background" on your camera- or go into the Lightning tab and check things out there- could be the GI system
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Reset Changes Lights?
« Reply #2 on: March 04, 2016, 12:52:32 PM »
This is probably a Unity bug with continuous baking.
If you google "unity lighting changes on play" you'll find a lot of people complaining about this.

The fix seems to be: in the Editor, go to Window -> Lighting -> Lightmap Tab -> Disable Continuous Baking -> Press Build to bake the lighting.

It should also work fine in builds. The bug only effects lighting when playing in the editor.


mTruly

  • Junior Playmaker
  • **
  • Posts: 98
Re: Reset Changes Lights?
« Reply #3 on: March 04, 2016, 02:19:44 PM »
Thanks very much for the ideas!

The 'Continuous Baking' bug was the problem... sorted now.

Thanks again.