- Home /
Prefabs wont work after Unity crashed while lightmap baking
Hi, I am making an endless runner game and I was baking the final light map on each tile in my game. I got to tile 6/18 and halfway through the light-map bake, Unity crashed. Upon opening the project again, tiles 5-18 were not showing up so I deleted them and tried to add them to the hierarchy again via their prefabs. When trying to do this I discovered that I am not able to drag them into the hierarchy.
I immediately tried exporting the prefabs as a package and installing them into a different project, same issue. This time though, instead of being able to see what my tile looks like through its prefab icon, it's now a white box.
Unity 4.1.2f1
Any assistance in fixing this issue without re-making all of the tiles would be greatly appreciated!
another note, in my original project, the error I am seeing is "childPrefab.m_RootGameObject.IsValid()". I searched this and variations of it on google and have had no luck in finding what the error is, how I could fix it etc.
Answer by dorpeleg · Jul 20, 2013 at 03:49 PM
What I believe happened was, The prefabs got corrupted while unity crashed.
I do not think there is anything you can do about it, unless you have a backup of the meta files (which has all prefab related info).
$$anonymous$$y last backup was before I created the prefabs, what would I do if I did have the metadata files though? I will attempt the solution on the current project if possible
It's a bit complicated...
I tried to do this once... didn't go very well.
What I did was to go over the meta files one by one (yes, it's stupid :P) and open them and look for the ones that are related to my broken prefabs, then copy those to the broken project.
Of curse, in the broken project you need to do the same, only delete the broken ones.
This is a very bad way of doing it and may not even work... I think it will be faster just to redo the prefabs.
Just remember to keep backups.