Class fsPrimitiveConverter
Inherited Members
Namespace: Unity.VisualScripting .FullSerializer
Assembly: Unity.VisualScripting.Core.dll
Syntax
public class fsPrimitiveConverter : fsConverter
Methods
CanProcess(Type)
Can this converter serialize and deserialize the given object type?
Declaration
public override bool CanProcess(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The given object type. |
Returns
Type | Description |
---|---|
bool | True if the converter can serialize it, false otherwise. |
Overrides
RequestCycleSupport(Type)
If true, then the serializer will support cyclic references with the given converted type.
Declaration
public override bool RequestCycleSupport(Type storageType)
Parameters
Type | Name | Description |
---|---|---|
Type | storageType | The field/property type that is currently storing the object that is being serialized. |
Returns
Type | Description |
---|---|
bool |
Overrides
RequestInheritanceSupport(Type)
If true, then the serializer will include inheritance data for the given converter.
Declaration
public override bool RequestInheritanceSupport(Type storageType)
Parameters
Type | Name | Description |
---|---|---|
Type | storageType | The field/property type that is currently storing the object that is being serialized. |
Returns
Type | Description |
---|---|
bool |
Overrides
TryDeserialize(fsData, ref object, Type)
Deserialize data into the object instance.
Declaration
public override fsResult TryDeserialize(fsData storage, ref object instance, Type storageType)
Parameters
Type | Name | Description |
---|---|---|
fs |
storage | |
object | instance | The object instance to deserialize into. |
Type | storageType | The field/property type that is storing the instance. |
Returns
Type | Description |
---|---|
fs |
True if serialization was successful, false otherwise. |
Overrides
TrySerialize(object, out fsData, Type)
Serialize the actual object into the given data storage.
Declaration
public override fsResult TrySerialize(object instance, out fsData serialized, Type storageType)
Parameters
Type | Name | Description |
---|---|---|
object | instance | The object instance to serialize. This will never be null. |
fs |
serialized | The serialized state. |
Type | storageType | The field/property type that is storing this instance. |
Returns
Type | Description |
---|---|
fs |
If serialization was successful. |