Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Why managed IComponentData must implement the IEquatable ...

Discussion in 'Entity Component System' started by lang_dye, Dec 24, 2020.

  1. lang_dye

    lang_dye

    Joined:
    Aug 9, 2019
    Posts:
    2
    my native languege is not English, please forgive me for my poor description to the question.

    i read the Entities document, there is a description about managed IComponentData:
    "Managed IComponentData must implement the IEquatable<T> interface and override for Object.GetHashCode()."

    Is it meaning that managed IComponentData may be a hash key? I dont read the source code, maybe is there hashmap to map managed IComponentData onto the entity? I just want to know why, if someone know it, please tell me. Thanks.
     
    charleshendry likes this.