docs.unity.cn
    Show / Hide Table of Contents

    Method CalculateDifference

    CalculateDifference(EntityArchetype, EntityArchetype, Int32*, out Int32, Int32*, out Int32)

    Calculates the difference between two archetypes. Reports what components need to be added to and removed from "before" in order to convert it to "after".

    Declaration
    public static void CalculateDifference(EntityArchetype before, EntityArchetype after, int *addedTypes, out int addedTypesCount, int *removedTypes, out int removedTypesCount)
    Parameters
    Type Name Description
    EntityArchetype before

    First archetype

    EntityArchetype after

    Second archetype

    Int32* addedTypes

    Buffer to hold type indices of types present in "after" but not in "before". Buffer must be large enough to potentially hold all the types present in "after"

    Int32 addedTypesCount

    How many types were put into the addedTypes buffer

    Int32* removedTypes

    Buffer to hold type indices of types present in "before" but not in "after". Buffer must be large enough to potentially hold all the types present in "before"

    Int32 removedTypesCount

    How many types were put into the removedTypes buffer

    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Wednesday, July 6, 2022
    Terms of use