Arma Reforger Script API
Loading...
Searching...
No Matches
ScriptedEntitySerializer Interface Reference
Inheritance diagram for ScriptedEntitySerializer:
PersistenceSerializerBase DestructionManagerSerializer GenericEntitySerializer MusicManagerSerializer SCR_AIGroupSerializer SCR_AIWaypointArtillerySupportSerializer SCR_FactionManagerSerializer SCR_GameModeCampaignSerializer SCR_PlayerControllerSerializer TimeAndWeatherManagerEntitySerializer

Static Public Member Functions

static EEntityDeserializeEvent GetDeserializeEvent ()
 
- Static Public Member Functions inherited from PersistenceSerializerBase
static TypeName GetTargetType ()
 Delcare the type this serializer can handle so it can automatically find matching data instances. MUST be implemented!
 
static EDeserializeFailHandling GetDeserializeFailHandling ()
 Optinally override this if a failure in deserialization logic requires the entity/scripted state to be deleted as it would not be useable at all.
 

Protected Member Functions

bool DeserializeSpawnData (out ResourceName prefab, out EntitySpawnParams params, notnull BaseSerializationLoadContext context)
 In case the spawn data needs to be read early from the context. Uusally called from spawn operations on the system.
 
proto external ESerializeResult SerializeSpawnDataNative (notnull IEntity entity, notnull BaseSerializationSaveContext context, SerializerDefaultSpawnData defaultData)
 Native spawn data serialization logic that can be called explictly if script overrides SerializeSpawnData.
 
proto external ESerializeResult SerializeNative (notnull IEntity entity, notnull BaseSerializationSaveContext context, ENativeSerializerMode mode=ENativeSerializerMode.NATIVE)
 Native serialization logic used by the game. Can be called by scripts before or after custom data or not all.
 
proto bool DeserializeSpawnDataNative (out ResourceName prefab, notnull EntitySpawnParams params, notnull BaseSerializationLoadContext context)
 Native spawn data deserilization logic.
 
proto external bool DeserializeNative (notnull IEntity entity, notnull BaseSerializationLoadContext context, ENativeSerializerMode mode=ENativeSerializerMode.NATIVE)
 Native deserialization logic used by the game. Can be called by scripts before or after custom data or not all.
 
ESerializeResult SerializeSpawnData (notnull IEntity entity, notnull BaseSerializationSaveContext context, SerializerDefaultSpawnData defaultData)
 Custom entity spawn data serialization logic if needed. Must match the data that DeserializeSpawnData will attempt to read.
 
ESerializeResult Serialize (notnull IEntity entity, notnull BaseSerializationSaveContext context)
 Custom implementation for writing the entity data into into the save context.
 
bool Deserialize (notnull IEntity entity, notnull BaseSerializationLoadContext context)
 Custom implementation for deserialzing the entity data from the load context.
 
- Protected Member Functions inherited from PersistenceSerializerBase
void Setup ()
 Do any inital configuration of the serializer once it is linked to the system.
 

Additional Inherited Members

- Public Member Functions inherited from PersistenceSerializerBase
proto external PersistenceSystem GetSystem ()
 Get persistence system the serializer is linked to.
 

Member Function Documentation

◆ Deserialize()

bool ScriptedEntitySerializer.Deserialize ( notnull IEntity entity,
notnull BaseSerializationLoadContext context )
protected

Custom implementation for deserialzing the entity data from the load context.

Returns
True for success. False for data/state errors which will abort the process and use configured fault handling

Implemented in MusicManagerSerializer, SCR_AIGroupSerializer, SCR_AIWaypointArtillerySupportSerializer, SCR_FactionManagerSerializer, SCR_GameModeCampaignSerializer, SCR_PlayerControllerSerializer, SCR_ScenarioFrameworkTriggerEntitySerializer, and TimeAndWeatherManagerEntitySerializer.

◆ DeserializeNative()

proto external bool ScriptedEntitySerializer.DeserializeNative ( notnull IEntity entity,
notnull BaseSerializationLoadContext context,
ENativeSerializerMode mode = ENativeSerializerMode.NATIVE )
protected

Native deserialization logic used by the game. Can be called by scripts before or after custom data or not all.

◆ DeserializeSpawnData()

bool ScriptedEntitySerializer.DeserializeSpawnData ( out ResourceName prefab,
out EntitySpawnParams params,
notnull BaseSerializationLoadContext context )
protected

In case the spawn data needs to be read early from the context. Uusally called from spawn operations on the system.

Implemented in BuildableEntitySerializer, and SCR_AIGroupSerializer.

◆ DeserializeSpawnDataNative()

proto bool ScriptedEntitySerializer.DeserializeSpawnDataNative ( out ResourceName prefab,
notnull EntitySpawnParams params,
notnull BaseSerializationLoadContext context )
protected

Native spawn data deserilization logic.

Parameters
prefabResource name to get filled out
paramsSpawn params that NEED to be provided and will get changed by native data if neccessary. Usually the instance from DeserializeSpawnData should simply be passed through.
contextDeserialization data context to read the spawn parameters from.

◆ GetDeserializeEvent()

static EEntityDeserializeEvent ScriptedEntitySerializer.GetDeserializeEvent ( )
static

◆ Serialize()

ESerializeResult ScriptedEntitySerializer.Serialize ( notnull IEntity entity,
notnull BaseSerializationSaveContext context )
protected

Custom implementation for writing the entity data into into the save context.

Returns
True for success. False for data/state errors which will abort the process and use configured fault handling

Implemented in MusicManagerSerializer, SCR_AIGroupSerializer, SCR_AIWaypointArtillerySupportSerializer, SCR_FactionManagerSerializer, SCR_GameModeCampaignSerializer, SCR_PlayerControllerSerializer, SCR_ScenarioFrameworkTriggerEntitySerializer, and TimeAndWeatherManagerEntitySerializer.

◆ SerializeNative()

proto external ESerializeResult ScriptedEntitySerializer.SerializeNative ( notnull IEntity entity,
notnull BaseSerializationSaveContext context,
ENativeSerializerMode mode = ENativeSerializerMode.NATIVE )
protected

Native serialization logic used by the game. Can be called by scripts before or after custom data or not all.

◆ SerializeSpawnData()

ESerializeResult ScriptedEntitySerializer.SerializeSpawnData ( notnull IEntity entity,
notnull BaseSerializationSaveContext context,
SerializerDefaultSpawnData defaultData )
protected

Custom entity spawn data serialization logic if needed. Must match the data that DeserializeSpawnData will attempt to read.

Implemented in SCR_AIGroupSerializer.

◆ SerializeSpawnDataNative()

proto external ESerializeResult ScriptedEntitySerializer.SerializeSpawnDataNative ( notnull IEntity entity,
notnull BaseSerializationSaveContext context,
SerializerDefaultSpawnData defaultData )
protected

Native spawn data serialization logic that can be called explictly if script overrides SerializeSpawnData.


The documentation for this interface was generated from the following file: