Workarounds for Nested Prefabs

Hey fellas, after raging at Unity for not updating my nested prefabs, I did the research and realized that is simply does not support them. Welp!

The game I’m working on involves many different types of vehicles (effectively an RTS), but with shared parts (turrets, wheels, etc.) My instinct from using other programs was of course to make one prefab for each kind of shared object and then stick copies of it into each appropriate unit, but that of course doesn’t work out when you need to make adjustments to them.

So the best solution, it seems, is to have a ‘God’ class with references to all prefabs, and instantiate them via code. When a change needs to be made to a unit, I would edit the appropriate .js.

But this requires potentially having .js for every individual type of instantiated object, means of determining where it should be mounted to the parent, etc.

I’ll admit my jimmies are quite rustled on this issue. No native nested prefab support seems like a huge oversight. And I am very, very hesitant to shell out $35+ on a third-party plug-in, especially with a new release of Unity coming out soon (where there are some rumors of native nested prefab support… but again, shouldn’t this have been something put in place years ago?)

Or, best case scenario: I’m just missing an obvious workaround, that hopefully someone can exemplify for me? :]

Thanks as always, guys!

I found this one, haven’t try it out but might be that’s what you need : http://framebunker.com/blog/poor-mans-nested-prefabs/

“So the best solution, it seems, is to have a ‘God’ class with references to all prefabs, and instantiate them via code. When a change needs to be made to a unit, I would edit the appropriate .js”

This. Have empty game object “anchors” for all the smaller prefabs and a script for each object. Each of your vehicles is gonna end up having at least 1 script attached to it anyway right? You just need to add the prefabs in at the Awake() part for each vehicle.

That’s what I’d do at least in your case.

Also another solution of Prefab Nesting
http://forum.unity3d.com/threads/236719-Prefab-Evolution-Plugin

Why not check out our plugin “nested prefab” from Bento here: Nested Prefab | Integration | Unity Asset Store