Traits System
Traits are modular behaviors you can add to any URT3D asset โ including movement, rotation, animation, and interactivity. Learn how to use them and create your own.
Last updated
Traits are modular behaviors you can add to any URT3D asset โ including movement, rotation, animation, and interactivity. Learn how to use them and create your own.
Last updated
๐ Looking for detailed implementation docs? This page gives you a high-level overview, but you can always dive deeper in the official SDK documentation on GitHub:
Traits are modular components that extend the functionality of a URT3D asset. Instead of relying on rigid inheritance or custom code for every new behavior, URT3D lets you add traits to assets as needed โ much like attaching Unity components.
Each trait encapsulates a single capability: position, rotation, animation, interactivity, and more.
๐น What Are Traits?
Traits are attached at the asset level. You can add them visually (via Inspector) or define them in a .urta
file.
They are accessible via code like this:
Traits are also available inside MiniScript using GetTrait("TraitName")
.
๐น Common Built-In Traits
TraitPosition3d Controls the world position of the asset.
TraitRotation3d Handles local or global rotation.
TraitScale3d Enables scaling via Vector3 or uniform float.
TraitAnimatable Plays, stops, or loops named animation clips embedded in the asset.
TraitInteractable Exposes user interactions like clicks and hover events.
๐น Custom Traits
You can create your own traits by subclassing the Trait
base class.
Traits integrate with the Inspector and can be saved into .urta
files for reuse.
๐น In MiniScript
Inside MiniScript, you can use traits like this:
Use HasTrait()
to check if a trait exists before calling it.
๐น Why Traits Matter
โข Traits reduce boilerplate setup โข Traits are portable between assets โข Traits keep asset behavior modular and composable โข Traits are compatible with scripting and drag-and-drop workflows
๐ฌ Need Help?
๐ฉ Email us at: