EntityManager.addEntity

Add entity to system. Returen pointer is valid only before one from commit(), begin() or end() will be called. To save entity to further use you should save ID instead of pointer.

  1. Entity* addEntity(EntityTemplate* tmpl)
    struct EntityManager
    export
    addEntity
  2. Entity* addEntity(EntityTemplate* tmpl, ComponentRef[] replacement)

Parameters

tmpl EntityTemplate*

pointer entity template allocated by EntityManager. Can be null in which case empty entity would be added (entity without components)

Meta