User Tools

Site Tools


ientityfactory

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
ientityfactory [2026/08/15 06:30] – created divinerientityfactory [2026/08/15 08:28] (current) – diviner
Line 1: Line 1:
 ===== IEntityFactory ===== ===== IEntityFactory =====
  
-This service's primary responsibility is to create and release [[Entity|Entities]]. Entity creation is driven by [[EntityStaticData]], with the appropriate runtime Entity implementation and [[IComponent|Components]] resolved through the dependency injection container. Component values marked for initialization from static data are populated automatically during creation. Created Entities are registered with the [[IEntityRepository]], optionally associated with a [[Chunk]], and monitored for destruction so their Components, identifiers and container-managed instances can be released.+This service's primary responsibility is to create and release [[IEntity|Entities]]. Entity creation is driven by [[EntityStaticData]], with the appropriate runtime Entity implementation and [[IComponent|Components]] resolved through the dependency injection container. Component values marked for initialization from static data are populated automatically during creation. Created Entities are registered with the [[IEntityRepository]], optionally associated with a [[Chunk]], and monitored for destruction so their Components, identifiers and container-managed instances can be released.
  
 **Broadcasts Events:** [[EntityCreatedTopic]], [[EntityDestroyedTopic]] **Broadcasts Events:** [[EntityCreatedTopic]], [[EntityDestroyedTopic]]
Line 16: Line 16:
  
 ^Method | void **ReleaseAllEntities**() | ^Method | void **ReleaseAllEntities**() |
-^Description | Destroys all currently registered [[Entity|Entities]]. Entity destruction is handled through the factory's destruction subscription, which unregisters the Entity as a broadcaster, releases its [[IComponent|Components]] and Entity instance from the dependency injection container, releases its unique identifier when applicable, unregisters it from the [[IEntityRepository]] and broadcasts an [[EntityDestroyedTopic]]. |+^Description | Destroys all currently registered [[IEntity|Entities]]. Entity destruction is handled through the factory's destruction subscription, which unregisters the Entity as a broadcaster, releases its [[IComponent|Components]] and Entity instance from the dependency injection container, releases its unique identifier when applicable, unregisters it from the [[IEntityRepository]] and broadcasts an [[EntityDestroyedTopic]]. |
  
 ^Method | void **BroadcastEntityCreation**([[IEntity]] entity) | ^Method | void **BroadcastEntityCreation**([[IEntity]] entity) |
 ^Description | Manually broadcasts an [[EntityCreatedTopic]] for specified [[IEntity]]. This can be used when Entity creation broadcasting was previously suppressed and should be invoked after additional initialization has completed. | ^Description | Manually broadcasts an [[EntityCreatedTopic]] for specified [[IEntity]]. This can be used when Entity creation broadcasting was previously suppressed and should be invoked after additional initialization has completed. |
  
ientityfactory.1786775431.txt.gz · Last modified: by diviner

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki