docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class fsObjectProcessor

    Enables injecting code before/after an object has been serialized. This is most useful if you want to run the default serialization process but apply a pre/post processing step.

    Multiple object processors can be active at the same time. When running they are called in a "nested" fashion - if we have processor1 and process2 added to the serializer in that order (p1 then p2), then the execution order will be p1#Before p2#Before /serialization/ p2#After p1#After.

    Inheritance
    object
    fsObjectProcessor
    fsSerializationCallbackProcessor
    fsSerializationCallbackReceiverProcessor
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.VisualScripting.FullSerializer
    Assembly: Unity.VisualScripting.Core.dll
    Syntax
    public abstract class fsObjectProcessor

    Methods

    CanProcess(Type)

    Is the processor interested in objects of the given type?

    Declaration
    public virtual 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.

    OnAfterDeserialize(Type, object)

    Called after deserialization.

    Declaration
    public virtual 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.

    OnAfterSerialize(Type, object, ref fsData)

    Called after serialization.

    Declaration
    public virtual 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.

    fsData data

    The data that was serialized.

    OnBeforeDeserialize(Type, ref fsData)

    Called before deserialization.

    Declaration
    public virtual void OnBeforeDeserialize(Type storageType, ref fsData data)
    Parameters
    Type Name Description
    Type storageType

    The field/property type that is storing the instance.

    fsData data

    The data that will be used for deserialization.

    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 virtual 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.

    fsData data

    The data that will be used for deserialization.

    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 virtual 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.

    Extension Methods

    Cloning.Clone(object, ICloner, bool)
    Cloning.Clone(object, ICloner, bool)
    Cloning.CloneViaFakeSerialization(object)
    Cloning.CloneViaFakeSerialization(object)
    ConversionUtility.ConvertTo(object, Type)
    ConversionUtility.ConvertTo(object, Type)
    ConversionUtility.ConvertTo<T>(object)
    ConversionUtility.ConvertTo<T>(object)
    ConversionUtility.IsConvertibleTo(object, Type, bool)
    ConversionUtility.IsConvertibleTo(object, Type, bool)
    ConversionUtility.IsConvertibleTo<T>(object, bool)
    ConversionUtility.IsConvertibleTo<T>(object, bool)
    Serialization.Serialize(object, bool)
    Serialization.Serialize(object, bool)
    TypeUtility.ToShortString(object, int)
    TypeUtility.ToShortString(object, int)
    UnityObjectUtility.IsUnityNull(object)
    UnityObjectUtility.IsUnityNull(object)
    UnityObjectUtility.ToSafeString(object)
    UnityObjectUtility.ToSafeString(object)
    XAnalyserProvider.Analyser(object, GraphReference)
    XAnalyserProvider.Analyser(object, IGraphContext)
    XAnalyserProvider.Analyser<TAnalyser>(object, GraphReference)
    XAnalyserProvider.Analyser<TAnalyser>(object, IGraphContext)
    XAnalyserProvider.Analysis(object, GraphReference)
    XAnalyserProvider.Analysis(object, IGraphContext)
    XAnalyserProvider.Analysis<TAnalysis>(object, GraphReference)
    XAnalyserProvider.Analysis<TAnalysis>(object, IGraphContext)
    XDescriptorProvider.Describe(object)
    XDescriptorProvider.Description(object)
    XDescriptorProvider.Description<TDescription>(object)
    XDescriptorProvider.Descriptor(object)
    XDescriptorProvider.Descriptor<TDescriptor>(object)
    XDescriptorProvider.HasDescriptor(object)
    Cloning.CloneViaFakeSerialization<T>(T)
    Cloning.CloneViaFakeSerialization<T>(T)
    Cloning.Clone<T>(T, ICloner, bool)
    Cloning.Clone<T>(T, ICloner, bool)
    LinqUtility.Yield<T>(T)
    LinqUtility.Yield<T>(T)
    Serialization.CloneViaSerializationInto<TSource, TDestination>(TSource, ref TDestination, bool)
    Serialization.CloneViaSerializationInto<TSource, TDestination>(TSource, ref TDestination, bool)
    Serialization.CloneViaSerialization<T>(T, bool)
    Serialization.CloneViaSerialization<T>(T, bool)
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)