This document is about: QUANTUM 2
SWITCH TO

Initialization

In addition to the default Frame.Create() and Frame.Destroy() methods, the FPS Template provides an extended initialization pipeline for entities. It is strongly recommended to use Frame.CreateEntity() and Frame.DestroyEntity().

The following parameters can be passed into the CreateEntity() method to initialize the Entity:

  • AssetRefEntityPrototype entityPrototype: prototype entity is created from, required
  • EntityRef owner: owner entity, optional, default is EntityRef.None
  • FPVector3 position: initial position, optional, default is FPVector3.Zero
  • FPQuaternion rotation: initial rotation, optional, default is FPQuaternion.Identity
  • IEntityInitializer entityInitializer: custom object used to initialize the entity before returning control, optional

The diagram below shows the entity initialization flow; the deinitialization flow is similar.

fps template entity initialization
Entity Initialization
Back to top