Hi. I’m having a problem just since installing 4.6, that I didn’t have with 4.6 Beta. I’m in the testing phase of my game so for convenience, instead of restarting a scene by clicking play twice, I have the following in a script:
//FOR TESTING ONLY
if (Input.GetButton ("Restart"))
{
Application.LoadLevel(Application.loadedLevel);
}
“Restart” is set to ‘r’ in the Input manager.
I’m using UI elements in my levels, so I have an EventSystem in each scene. Before the newest install, I could restart perfectly with no errors but now I get the following when I press it:
[36008-null+ref+event+system.png|36008]
I don’t know what to do about it. I tried putting the EventSystem on a gameobject and instantiating that object at the start of the level, and I also tried putting it on an object that uses “DontDestroyOnLoad(this.gameobject)” but even then it won’t restart without an error.
Right now the event system is in the scene’s hierarchy (not instantiated), IS destroyed on load, and that error is thrown up as soon as I press “Restart”, but it’ll run the initial level just fine, until I restart.
Any ideas?
Thanks
Kevin