Class SynthesizedTrait<T> | MARS | 1.0.1
docs.unity3d.com
    Show / Hide Table of Contents

    Class SynthesizedTrait<T>

    Representation for a single typed property in a Synthesized MARS Object

    Inheritance
    Object
    SynthesizedTrait
    SynthesizedTrait<T>
    SynthesizedAlignment
    SynthesizedBounds2D
    SynthesizedPose
    SynthesizedSemanticTag
    Inherited Members
    SynthesizedTrait.TraitName
    SynthesizedTrait.UpdateWithTransform
    Namespace: Unity.MARS.Data
    Syntax
    public abstract class SynthesizedTrait<T> : SynthesizedTrait, ISimulatable, IProvidesTraits<T>, IProvidesTraits
    Type Parameters
    Name Description
    T

    The type of data being represented by this trait

    Fields

    k_ProvidedTraits

    Declaration
    protected static readonly TraitDefinition[] k_ProvidedTraits
    Field Value
    Type Description
    TraitDefinition[]

    Methods

    AddTrait(Int32)

    Declaration
    public override sealed void AddTrait(int dataID)
    Parameters
    Type Name Description
    Int32 dataID
    Overrides
    SynthesizedTrait.AddTrait(Int32)

    GetProvidedTraits()

    Declaration
    public TraitDefinition[] GetProvidedTraits()
    Returns
    Type Description
    TraitDefinition[]
    Implements
    IProvidesTraits.GetProvidedTraits()

    GetTraitData()

    Calculates and retrieves the most up-to-date piece of data representing this trait

    Declaration
    public abstract T GetTraitData()
    Returns
    Type Description
    T

    RemoveTrait(Int32)

    Declaration
    public override sealed void RemoveTrait(int dataID)
    Parameters
    Type Name Description
    Int32 dataID
    Overrides
    SynthesizedTrait.RemoveTrait(Int32)

    UpdateTrait(Int32)

    Declaration
    public override sealed void UpdateTrait(int dataID)
    Parameters
    Type Name Description
    Int32 dataID
    Overrides
    SynthesizedTrait.UpdateTrait(Int32)

    Extension Methods

    IProvidesTraitsMethods.AddOrUpdateTrait<T>(IProvidesTraits<T>, Int32, String, T)
    IProvidesTraitsMethods.RemoveTrait<T>(IProvidesTraits<T>, Int32, String)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023