Hi there So I saw this blog post from Nicholas F; http://framebunker.com/blog/poor-mans-nested-prefabs/ Thats pretty exciting. However I cant really seem to get it working Can someone walk a scripting noob through the process from A-Z. Is it a C# script or Java? I have tried doing it as a C# script but then I cannot apply it to my game objects. When applied as a Java script I cant really seem to figure out the functionality. Any help on the subject would be greatly appreciated Thanks
Hmm well now I managed to add the component as a new C script to my object. However I am sort of clueless of how this script actually works - ? How do I assign the prefabs to the "master" prefab? Should all prefabs used in the setup have the script assigned? I also get this error message on the scipt component on my prefab; The associated script cannot be loaded. Please fix any complie errors and assign a valid script". This of course indicates I have done something quite wrong - I just dont know what. Sorry for being such a clueless art git but I am trying my best Thanks
Make a file called PrefabInstance.cs and put it under Assets/Editor/ somewhere. Then make an empty gameobject. Add a "Prefab Instance" component to it. It has a public attribute called "prefab". Choose a prefab from your assets and put it in there. Now this new gameobject you made should look like the prefab it is pointing at. At run-time, it'll make an instance of that prefab.
Thank you so much for your answer However I cannot seem to be able to find and add the "Prefab Instance" component to my game object - ? I made the PrefabInstance.cs and put it in the editor folder but I have no Prefab Instance component available it seems. Any idea why? Thanks again
Hi again Alright I now managed to get it working and thought I just wanted to share how I did it in case anyone was having similar issues. Aside from adding the PrefabInstances.cs to your Assets\Editor\ folder you also need to add it to another folder in your project. Personally I have a folder just called scripts where I made another PrefabInstances.cs. Now it is possible to add the prefab instance component to your prefabs. Most excellent