How can I convert to an Entity from prefab, just like GetEntity() from Baker?
because how would I load prefabs from the cloud storage?
1 Answer
1Runtime Conversion is fully removed for after Entities 1.0, the only way to use Baking is through Sub Scenes!
You can convert anything you need to entity, then cache it in a component data, anytime you need, just looking for it and Instantiate with ECB or EntityManager!
What do you mean by cache it? And what if I want to manage a clothing store? I don't want to load all clothes; I want only to load the ones that the player selected.
– SongerkIn this case, you can create the entity then add the materials, meshes and graphic components using RenderMeshUtility.AddComponents, but you should do the profiling carefully!
– TheBlessedBearBut what if it is a multi-layer cloth? For example, the hat has a feather that does a little animation.
– SongerkYou will need to split that feather into an entity and make it become the child of the hat (for example), that's basic structure!
– TheBlessedBear