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, requiredEntityRef owner
: owner entity, optional, default isEntityRef.None
FPVector3 position
: initial position, optional, default isFPVector3.Zero
FPQuaternion rotation
: initial rotation, optional, default isFPQuaternion.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.
Back to top