- Home /
Unity crashing after pressing CTRL D on gameobject or trying to make into prefab!?
I've run into an issue when I try to save a gameobject from my scene as a prefab. All the other gameobjects can be turned into prefabs without any issues but when I drag the one from the screenshot into a prefab Unity will almost immediately crash and when I load it back up the prefab created is corrupted/doesn't work.
EDIT: Even pressing CTRL D on the gameobject is causing Unity to crash!? I have no idea what could be causing this all the others work fine. Any help would be much appreciated!!
Update: I decided to recreate the gameobject from scratch in a new scene. When it was done I tried pressing CTRL D to duplicate it and Unity crashed again.
Well, do you have any scripts on that object? If so, does it have some code inside Reset? $$anonymous$$aybe some code inside another method (Awake, OnEnable or the constructor)?
Yes I probably used onAwake in one of them, would that cause this? If so why?
$$anonymous$$aybe there is some bad code on it? If you post what you have on it here, someone may be able to find the error. Or have you tried duplicating it without the scripts?
Check the Editor Log file (http://docs.unity3d.com/$$anonymous$$anual/LogFiles.html). The stacktrace is usually in the bottom of the log file I think
Your answer
Follow this Question
Related Questions
Unity Crashes When Spawning Prefab 2 Answers
Crash on play befor the game even starts. 1 Answer
Game no reopen before go to Desktop or something (FullScreen) 0 Answers
Unity 5.3.2 Crashes on startup 0 Answers
Unable To Understand Android Crash : android.view.ViewGroup.offsetRectBetweenParentAndChild 0 Answers