#Is authoring best practice?

1 messages · Page 1 of 1 (latest)

willow halo
#

I wonder is authoring is best practice for creating entities or should I use EntityManager?

thorn silo
#

Authoring

#

EM is bad practice

willow halo
# thorn silo Authoring

I'm asking to confirm, would it be a correct approach to create a prefab for every entity in my game, such as characters, enemies, buildings, and put an authoring script in it, thus spawning this prefab? I'm wondering how I should establish the relationship between Entity and GameObjects. For example, I will spawn an enemy and the enemy has certain components. How should I approach this situation? Also, which component should I use to render an entity?

last path
# thorn silo Authoring

I use authoring to create prefab entities and EM to create actual entities in batch, does it count as a bad practice? Hmm.

thorn silo
#

are you not making the actual entities in batch from an authored prefab?

last path
thorn silo
#

that's how i took the question

#

but if it's not then yeah em is fine to instantiate prefabs

#

creating entities while baking is actually super awkward

last path
#

how I should establish the relationship between Entity and GameObjects.
You don't establish any relationship between entity and gameobject. GameObjects inside a subscene are just a friendly way to prepare data for your ECS world. Think of them as temporary placeholder for your data, nothing more.

#

After a subscene is fully baked, it becomes a blob of native data, GameObjects don't live there and will all vanish.