Class fsSerializationCallbackProcessor
Inherited Members
Namespace: Unity.VisualScripting .FullSerializer
Assembly: Unity.VisualScripting.Core.dll
Syntax
public class fsSerializationCallbackProcessor : fsObjectProcessor
Methods
CanProcess(Type)
Is the processor interested in objects of the given type?
Declaration
public override bool CanProcess(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The given type. |
Returns
Type | Description |
---|---|
bool | True if the processor should be applied, false otherwise. |
Overrides
OnAfterDeserialize(Type, object)
Called after deserialization.
Declaration
public override void OnAfterDeserialize(Type storageType, object instance)
Parameters
Type | Name | Description |
---|---|---|
Type | storageType | The field/property type that is storing the instance. |
object | instance | The type of the instance. |
Overrides
OnAfterSerialize(Type, object, ref fsData)
Called after serialization.
Declaration
public override void OnAfterSerialize(Type storageType, object instance, ref fsData data)
Parameters
Type | Name | Description |
---|---|---|
Type | storageType | The field/property type that is storing the instance. |
object | instance | The type of the instance. |
fs |
data | The data that was serialized. |
Overrides
OnBeforeDeserializeAfterInstanceCreation(Type, object, ref fsData)
Called before deserialization has begun but after the object instance has been created. This will get invoked even if the user passed in an existing instance.
Declaration
public override void OnBeforeDeserializeAfterInstanceCreation(Type storageType, object instance, ref fsData data)
Parameters
Type | Name | Description |
---|---|---|
Type | storageType | The field/property type that is storing the instance. |
object | instance | The created object instance. No deserialization has been applied to it. |
fs |
data | The data that will be used for deserialization. |
Overrides
Remarks
IMPORTANT: The actual instance that gets passed here is not guaranteed to be an a subtype of storageType, since the value for instance is whatever the active converter returned for CreateInstance() - ie, some converters will return dummy types in CreateInstance() if instance creation cannot be separated from deserialization (ie, KeyValuePair).
OnBeforeSerialize(Type, object)
Called before serialization.
Declaration
public override void OnBeforeSerialize(Type storageType, object instance)
Parameters
Type | Name | Description |
---|---|---|
Type | storageType | The field/property type that is storing the instance. |
object | instance | The type of the instance. |