docs.unity.cn
    Show / Hide Table of Contents

    Enum EntityRemapUtility.HasRefResult

    Specifies if a System.Type has any Entity or Unity.Entities.BlobAssetReferenceData references in its hierarchy.

    Namespace: Unity.Entities
    Syntax
    public enum HasRefResult
    Remarks

    This enum is returned by HasEntityReferencesManaged(Type, out EntityRemapUtility.HasRefResult, out EntityRemapUtility.HasRefResult, Dictionary<Type, EntityRemapUtility.EntityBlobRefResult>, Int32) which recursively traverses a System.Type and its fields to find entity or blob asset references.

    In some cases Unity cannot find all the Entity/Blob references within a type. For example, if the type is polymorphic and non-sealed, or if the type hierarchy is deep, making it too expensive to be worth inspecting it exhaustively. In this cases, the value MayHaveRef specifies that although no actual reference was found, the type cannot be treated as a type which definitely does not have any references during serialization.

    Fields

    Name Description Value
    NoRef

    The System.Type does not have any References within the entire hierarchy.


    0
    MayHaveRef

    The System.Type might have References.


    Cases where we can't say with certainty if the type contains any references include if there is a polymorphic non-sealed type, or if the type hierarchy is deeper than the maximum specified recursion depth.

    This value can be handled while validating the data for serialization.

    1
    HasRef

    The System.Type has a reference that was directly seen by the function.


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