- Home /
How can i convert a prefab instance to an ordinary game object?
i added a prefab to the scene. i selected this added object in scene and applied menu item Game Object/Break Prefab Instance. i added my script to this game object. i have a field that accepts game object. this field accepts prefab objects. i cannot set this field with other game objects in the scene. it behaves like "prefabs accepts prefabs as parameters". how can i solve this?
maybe you need to change your script to run off a prefab rather than a game object.
maybe you need to reference a script that has already focused your prefab?
Answer by MarkD · Dec 01, 2013 at 09:32 PM
Why would you want to break a prefab in the first place? Isn't it easier to just drag the object model from the assets into it and assigning scripts manually.
Because the main use of a prefab after all is having a pre-compiled asset of both models and script together, so that you don't have to go trough the complete process of previous said? Because of this i find it very confusing that you wan't to break one up and to all the previous stuff again.
Answer by zhupeijun · Nov 21, 2017 at 03:15 AM
If you do not want to break the original prefab, one simple way to solve this is to copy this prefab and then put it into the scene or somewhere.
Another way is by breaking your prefab, from menu GameObject -> Break Prefab Instance