#Do I need to use a Baker to bake GameObject prefabs into entities ? Or is there an API for that ?

1 messages · Page 1 of 1 (latest)

wise river
#

All is in the title.
If I want Designers to add Prefab to a game I currently find myself doing something like :
1 - Building the GameObject Prefab
2 - Creating a Scriptable object fo T type to hold a reference
3 - Create an empty Baker the loop throught all the T Type either with adressables or the resources or any folder
4 - for each SO found I Do A Get Entity on the prefab GO reference
5 - Then store the reference somewhere for later use by the rest of the game

Is there any other way than doing the 3 - 4 steps ?

Like is there a function that exist that could be called outside of a baker that basically do the same thing ?

tacit lance
#

you can use asset postprocessor to detect if prefab has specific monobehaviour you want

#

and add label to it

#

then use filter in AssetDatabase.FindAssets

#

to get only those prefabs

#

alternatively, your designers can add those labels

#

but you do need baker to bake entity

#

no other way around