|
Enfusion Script API
|
Base serialization context for loading data back to the game. More...
Public Member Functions | |
| proto bool | Read (out void value) |
| Read a given value. Name of property is automatically derived from the input variable name. | |
| proto bool | ReadValue (string name, out void value) |
| Read an explictly named value. | |
| proto bool | ReadDefault (out void value, void defaultValue) |
| s. Read, if the property was not found but the context type allows to seek members (e.g. json) it will return the default value provided. | |
| proto bool | ReadValueDefault (string name, out void value, void defaultValue) |
| s. ReadValue andReadDefault | |
| proto bool | ReadMapKey (int idx, out string key) |
| Manual map key reading, must be read in order (idx=0..N) | |
| proto external bool | DoesKeyExist (string name) |
| Check if the currently open object has any member with the given key name. | |
| proto external bool | DoesObjectExist (string name) |
| Check if the context has a child object of that name. | |
Public Member Functions inherited from BaseSerializationContext | |
| proto external bool | CanSeekMembers () |
| proto external bool | IsValid () |
| proto external string | GetDataExtension () |
| proto external void | ConfigureTypeDiscriminator (string fieldName="$type") |
| Type discriminator is used to add polymorph object instance support to the serializer. | |
| proto external bool | EnableTypeDiscriminator (bool enabled) |
| Enable or disable, can be used to pause it for a specific variable and resume after it was written. | |
| proto external bool | IsTypeDiscriminatorEnabled () |
| Is the type discrimiation currently enabled. | |
| proto external void | Reset () |
| Reset buffers to re-use for new data. | |
| proto bool | StartMap (string name, out int count) |
| Start new map. Empty name will result in an anonymous map. Count must be known ahead of time. | |
| proto external bool | EndMap () |
| proto bool | StartArray (string name, out int count) |
| Start new array. Empty name will result in an anonymous array. Count must be known ahead of time. | |
| proto external bool | EndArray () |
| proto external bool | StartObject (string name=string.Empty) |
| Start new subobject. Empty name will result in an anonymous object. | |
| proto external bool | EndObject () |
Public Member Functions inherited from Managed | |
| proto external ref Managed | Clone () |
| Return shallow copy of object, or null if it is not allowed (not public constructor) | |
Base serialization context for loading data back to the game.
It works as an adapter between the game logic and serialized data.
Check if the currently open object has any member with the given key name.
This includes child objects. NOTE: Support depends on specific context implementation. Binary container will always return true!
Check if the context has a child object of that name.
NOTE: Support depends on specific context implementation. Binary container will always return true unless object seeking is enabled!
| proto bool BaseSerializationLoadContext.Read | ( | out void | value | ) |
Read a given value. Name of property is automatically derived from the input variable name.
| proto bool BaseSerializationLoadContext.ReadDefault | ( | out void | value, |
| void | defaultValue ) |
s. Read, if the property was not found but the context type allows to seek members (e.g. json) it will return the default value provided.
Manual map key reading, must be read in order (idx=0..N)
Read an explictly named value.
| proto bool BaseSerializationLoadContext.ReadValueDefault | ( | string | name, |
| out void | value, | ||
| void | defaultValue ) |
s. ReadValue andReadDefault