The Sandbox.unity is always marked as dirty after play mode

I follow the videos closely, so my project is very much like the original repo:

Each time I run the Sandbox scene in the play mode, the scene becomes dirty. And the very same value is changed inside the Sandbox.unity file. Sometimes it is just the 4th number after the floating point, but sometimes the difference is more drastic.

I have noticed among the commits in your repo a change that actually shows this problem:

So the problem actually occurs not only ‘on my machine’.

Could you please help me identify the actual reason why this value is changed? And how can we make it fixed? The pun is uninteded :slight_smile:

That actually goes all the way back to the very first course in the series. I think it’s an odd side effect of our OnBeforeSerialize code to ensure that when you copy an enemy, the ID is made to be unique. TBH, I’ve just ignored it.

I’ll see if I can nail this one down.

1 Like

Privacy & Terms