docs.unity3d.com
    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
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023