unity3d - Mass-Replacing Objects using Unity's label tags? -


im working on exercise, want create technical design documentation.

therefore, need evaluate possible solutions bunch of problems coming fictional project.

here's quick glance @ exercise:

the game's art & core game design split harshly - basically, core system, game mechanics , design created abstract, in order allow them work wide variety of art settings. also, 1 of restrictions re-use many assets, levels & designs possible.

now question:

i want level designers create levels using "template" objects (object have technical features required, ie slots attachments, correct scale, textures etc) , later replace these objects set of assets receive outsourcer.

since dont want manually replace objects whenever new set of assets, wanted do:

each template object gets descriptive label, , each asset delivered outsourcer needs have exact same label name corresponding template-counterpart stored in (for example custom attribute, channel, or in name).

i want replace templates related asset using script.

this done each set of assets. keep several deployments of engine, 1 per set, initially, they'd start out templates need replaced (since there need modifications each setting, both visually , game design perspective, keeping assets in 1 trunk/project didn't make sense me).

to make easier i'd use "database" of sorts (probably simple dictionary engine script query , filled out beforehand script upon delivery of new assets?).

my question is: possible? if yes, how difficult programmers perspective? have limited knowledge in field, i'd love hear lads & ladies think this.

also (very important) - know of better way achieve "replacability" of assets? or have easier way achieve want do? appreciate feedback! thank you!

quick edit: not applied 3d objects; textures need replaced, obviously

i think looking prefabs.

basically prefabs implements sort of prototype pattern. instead of putting scene's hierarchy directly gameobject can make prefab , put scene gameobject instance of prefab.

when gameobject scene linked prefab, , prefab modified, linked object modified too. if have several instances of same prefab, istances updated well.

the strong limitation feature that, since now, nested prefabs aren't supported.

i want level designers create levels using "template" objects (object have technical features required, ie slots attachments, correct scale, textures etc) , later replace these objects set of assets receive outsourcer.

this tipical use case. have placeholder scene (es. cube) subistitued model when artists provide it. if instantiate 100 cubes scene, when need substitute them, manually objects.

if instead have created prefab (lets call modelprefab) , cubes scene instances of prefab, when you'll have new 3d model can update prefab , linked instances updated too.

my question is: possible? if yes, how difficult programmers perspective?

if can work without nested prefabs have nothing, it's implemented. if need implement nested prefabs, might not straightforward.

quick edit: not applied 3d objects; textures need replaced, obviously

i made example above using models, can make prefab each gameobject collection of components (have @ component based object management if interested).


edit

yes, possible update prefabs throught script required functions in unityeditor namespace, mast used through editor extension. can found need in prefabutility class.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -