#Singleton entity during baking
1 messages · Page 1 of 1 (latest)
a singleton is just only 1 instance of an entity
var entity = EntityManager.CreateEntity(typeof(mycomponent))
you now have a singleton
var entity1 = EntityManager.CreateEntity(typeof(mycomponent))
you now no longer have a singleton
so to create a singleton in baking is just only bake 1 copy of an entity
there's nothing special or different about a singleton
the getsingleton method just has a check for entitycount == 1 in it