Class TraitAttribute | Kinematica | 0.5.0-preview.1
docs.unity.cn
    Show / Hide Table of Contents

    Class TraitAttribute

    Attribute used to annotate traits.

    Inheritance
    Object
    Attribute
    TraitAttribute
    Namespace: Unity.Kinematica
    Syntax
    [AttributeUsage(AttributeTargets.Struct)]
    public class TraitAttribute : Attribute, _Attribute
    Remarks

    Traits are user-defined characteristics that can be associated to tags or markers. Users can define own custom data by using C# structs. These structs will then show up in the Kinematica builder tool and allow tags or markers to be created carrying specific instances of the corresponding traits. A trait itself wraps the actual payload (the instance of the user-defined struct).

    [Trait]
    public struct Anchor
    {
        public AffineTransform transform;
    }

    See Also

    Binary.Tag
    Binary.Marker
    Query
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX