CreatedByOtherEntities

Introduction

The CreatedByOtherEntities property can be used if instances of an Entity will be created at runtime – such as bullets fired by a Spaceship Entity. Setting this property to true does the following:

  • Glue will generate a factory for the Entity type which includes a CreateNew method that can be used to create new Entity instances.
  • Glue will automatically add any newly-created instance of the given Entity to any PositionedObjectLists created in any Screens in Glue.
  • Glue will display an additional property “PooledByFactory” which can be used to enable pooling to reduce post-load memory allocation.

For more information on CreatedByOtherEntities, see the Created by Other Entities tutorial.