SerializedObject target has been destroyed.
I started to make a classic roll a ball game. When ball falls down from ground it passes through a triger and level restarts(with "SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex)" code).But when it restarts console gives this error and colour of the objects changes. Left one is normal one.
Answer by softwoodapps · Jun 15, 2018 at 12:20 AM
I had the same problem.
What I ended up doing was going into Window --> Lighting --> Scene --> Lightmapping Settings --> uncheck "Auto Generate" then click on the "Generate Lighting" button.
This fixed my problem, I have not built the project to see if there are any other problems however.
For me "Auto Generate" was unchecked. I checked it and the errors went away completely. Either way it seems like the "Auto Generate" lighting was the culprit.
Answer by alphadogware · Jul 21, 2018 at 11:13 AM
I regenerated all my lighting and it appears to have fixed this error I was getting:
SerializedObject target has been destroyed. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Answer by jonc113 · Oct 05, 2018 at 12:53 AM
I deleted my Library folder and let the game rebuild itself. Problem went away. It's a glitch!
Why u troll people? Don't do this or your scene get deleted. Of course i knew that deleting are folder called "Libarys" is not a good idea and made a backup before. How frustrated are people need to be to saying b$llsh!t like this.
Deleting the Library folder WILL NOT delete anything. It will cause Unity to rebuild the library from scratch, which is sometimes needed. I have done this many many times.
The folder is "Library" not "Librarys"
Of course, you should ALWAYS make a backup before doing anything major.
Answer by Erdal42 · Apr 29, 2020 at 03:00 PM
No idea why but resetting Game window resolution to Free Aspect also works and it's quick to do...
Your answer
![](https://koobas.hobune.stream/wayback/20220612163619im_/https://answers.unity.com/themes/thub/images/avi.jpg)