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
    SynthesizedManualPose
    SynthesizedPose
    SynthesizedSemanticTag
    Inherited Members
    SynthesizedTrait.TraitName
    SynthesizedTrait.SynthesizedObject
    SynthesizedTrait.UpdateWithTransform
    SynthesizedTrait.HasValidValue
    SynthesizedTrait.Awake()
    SynthesizedTrait.OnEnable()
    SynthesizedTrait.OnDisable()
    SynthesizedTrait.TryAdd()
    SynthesizedTrait.TryRemove()
    Namespace: Unity.MARS.Data.Synthetic
    Syntax
    public abstract class SynthesizedTrait<T> : SynthesizedTrait, ISimulatable, ISynthesizedData, 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)

    Add this trait to the associated SynthesizedObject in the MARS database

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

    The data ID which has been assigned to the associated SynthesizedObject

    Overrides
    SynthesizedTrait.AddTrait(Int32)

    GetProvidedTraits()

    Get the TraitDefinitions provided by this SynthesizedTrait

    Declaration
    public TraitDefinition[] GetProvidedTraits()
    Returns
    Type Description
    TraitDefinition[]

    The provided traits

    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

    The data for this trait

    RemoveTrait(Int32)

    Remove this trait from the associated SynthesizedObject in the MARS database

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

    The data ID which has been assigned to the associated SynthesizedObject

    Overrides
    SynthesizedTrait.RemoveTrait(Int32)

    UpdateTrait(Int32)

    Remove the data for this trait in the MARS database

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

    The data ID which has been assigned to the associated SynthesizedObject

    Overrides
    SynthesizedTrait.UpdateTrait(Int32)

    Extension Methods

    IProvidesTraitsMethods.AddOrUpdateTrait<T>(IProvidesTraits<T>, Int32, String, T)
    IProvidesTraitsMethods.RemoveTrait<T>(IProvidesTraits<T>, Int32, String)
    Back to top
    Terms of use
    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