Version: Unity 7.0 Alpha (7000.0)
LanguageEnglish
  • C#

EntityArchetype.CalculateDifference

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static void CalculateDifference(EntityArchetype before, EntityArchetype after, TypeIndex* addedTypes, out int addedTypesCount, TypeIndex* removedTypes, out int removedTypesCount);

Parameters

Parameter Description
before First archetype
after Second archetype
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"
addedTypesCount How many types were put into the addedTypes buffer
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"
removedTypesCount How many types were put into the removedTypes buffer

Description

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".