docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class TraitDefinition

    Trait's name and value type

    Inheritance
    object
    TraitDefinition
    Implements
    IEquatable<TraitDefinition>
    IEquatable<TraitRequirement>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.MARS.Data
    Assembly: Unity.MARS.Interfaces.dll
    Syntax
    [MovedFrom("Unity.MARS")]
    public class TraitDefinition : IEquatable<TraitDefinition>, IEquatable<TraitRequirement>

    Constructors

    TraitDefinition(string, Type)

    Creates a new TraitDefinition

    Declaration
    public TraitDefinition(string traitName, Type type)
    Parameters
    Type Name Description
    string traitName

    The name of the trait

    Type type

    The type of the trait's value

    Fields

    TraitName

    The name of the trait

    Declaration
    public readonly string TraitName
    Field Value
    Type Description
    string

    Type

    The type of the trait's value

    Declaration
    public readonly Type Type
    Field Value
    Type Description
    Type

    Methods

    Equals(TraitDefinition)

    Declaration
    public bool Equals(TraitDefinition other)
    Parameters
    Type Name Description
    TraitDefinition other
    Returns
    Type Description
    bool

    Equals(TraitRequirement)

    Declaration
    public bool Equals(TraitRequirement obj)
    Parameters
    Type Name Description
    TraitRequirement obj
    Returns
    Type Description
    bool

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    object.GetHashCode()

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()

    Implements

    IEquatable<T>
    IEquatable<T>
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)