- Home /
How to make an asset bundled scene NOT include a prefab?
Hello everyone,
This question may sound strange, but what I mean is the following:
I have two scenes with a "MyPlayer" object. If I make asset bundles of both scenes, they will both duplicate the "MyPlayer" object, which is unnecessary.
So, the idea is to make the "MyPlayer" another asset bundle so that through asset bundle dependencies, when I bundle up my scenes they will not include a MyPlayer and therefore just a reference to it, right?
However, is there a way to make it so that MyPlayer ISN'T a bundle and yet this behaviour happens? Say, if I put it in the resources folder or something?
I want to include the MyPlayer object in the main build, but I want the scenes (which are in asset bundles) to reference it rather than to each make their own MyPlayer (therefore increasing the build size) and also so I don't have to make MyPlayer a separate asset bundle, just a prefab. I want the scenes to just reference it so that they don't include the whole "MyPlayer" when building their bundle.
What would be the steps for this?
(I'm using Unity 4.x for this, so it's the legacy asset bundle system, but if this is possible with either the legacy or the new asset bundle system please let me know)