docs.unity.cn
    Show / Hide Table of Contents

    Enum ComponentTypeSerializationStrategy.DefaultType

    Denotes why this strategy is the default (or not). Higher value = more important.

    Namespace: Unity.NetCode
    Syntax
    [Flags]
    public enum DefaultType : byte
    Remarks

    This is a flags enum, so there may be multiple reasons why a strategy is considered the default.

    Fields

    Name Description Value
    NotDefault

    This is not the default.


    0
    YesAsEditorDefault

    It's an editor test variant, so we should default to it if we literally don't have any other defaults.


    2
    YesAsIsFallback

    This is the default variant only because we could not find a suitable one.


    4
    YesAsIsChildDefaultingToDontSerializeVariant

    Child entities default to DontSerializeVariant.


    8
    YesAsIsDefaultSerializerAndDefaultIsUnchanged

    The default serializer should be used. Only applicable if we're serialized. On children: This only applies if the user has set flag SendDataForChildEntity on the default serializer.


    16
    YesAsOnlyOneVariantBecomesDefault

    If the developer has created only 1 variant for a type, it becomes the default.


    32
    YesAsIsUserSpecifiedNewDefault

    This is the default variant selected by the user (via DefaultVariantSystemBase), and thus is higher priority than YesAsIsDefaultSerializerAndDefaultIsUnchanged.


    64
    YesViaUserSpecifiedNamedDefaultOrHash

    This is a default variant because the user has marked it as such (via a ComponentOverride). Highest priority.


    128
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 21, 2023