CalculateDifference(EntityArchetype, EntityArchetype, TypeIndex*, out int, TypeIndex*, out int)
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".
阅读时间1 分钟最后更新于 20 天前
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
CalculateDifference(EntityArchetype, EntityArchetype, TypeIndex*, int, TypeIndex*, int)
public static void CalculateDifference(EntityArchetype before, EntityArchetype after, TypeIndex* addedTypes, out int addedTypesCount, TypeIndex* removedTypes, out int removedTypesCount)
Parameters
First archetype
Second archetype
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"
How many types were put into the addedTypes buffer
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"
How many types were put into the removedTypes buffer