Method CalculateDifference
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".
Declaration
public static void CalculateDifference(EntityArchetype before, EntityArchetype after, TypeIndex* addedTypes, out int addedTypesCount, TypeIndex* removedTypes, out int removedTypesCount)
Parameters
Type | Name | Description |
---|---|---|
EntityArchetype | before | First archetype |
EntityArchetype | after | Second archetype |
TypeIndex* | 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" |
int | addedTypesCount | How many types were put into the addedTypes buffer |
TypeIndex* | 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" |
int | removedTypesCount | How many types were put into the removedTypes buffer |