docs.unity.cn
    Show / Hide Table of Contents

    Operator Inequality

    Inequality(TypeIndex, TypeIndex)

    TypeIndex instances are equal if they refer to the same component type instance.

    Declaration
    public static bool operator !=(TypeIndex lhs, TypeIndex rhs)
    Parameters
    Type Name Description
    TypeIndex lhs

    TypeIndex on left side of the equality expression.

    TypeIndex rhs

    TypeIndex on right side of the equality expression.

    Returns
    Type Description
    Boolean

    True, if both TypeIndices are equal.

    Remarks

    Note that two TypeIndex for the same Component Type may not always be equal. For example, a type inheriting from IComponentData could be used as a Chunk Component in one Archetype but not in another. If those two TypeIndices were compared they would not match even though they are for the same System.Type.

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 21, 2023