URT3D Docs
  • ๐Ÿ“˜Welcome to URT3D Docs
  • Getting Started
    • ๐Ÿš€Quickstart
  • Basics
    • ๐ŸŒIntroduction to URT3D
    • ๐Ÿ”„How to Convert Your Files
    • โฌ†๏ธUpload Tips and Guidelines
    • ๐Ÿ“ฆUsing Your Converted Files
    • ๐Ÿ› ๏ธTroubleshooting Conversion
  • ๐Ÿ“‚ Developers
    • ๐Ÿ‘ฉโ€๐Ÿ’ปGetting Started with the SDK
    • ๐Ÿ‘จโ€๐Ÿ’ปUnity Integration Guide
    • ๐Ÿ—๏ธCore Concepts & Architecture
    • ๐ŸงฌTraits System
    • โœ๏ธScripting System
      • ๐ŸงพMiniScript Recipes
    • ๐Ÿ“˜API Reference
    • ๐Ÿ’กExamples and Best Practices
    • ๐Ÿ›ฐ๏ธAdvanced Topics
Powered by GitBook
On this page
  • ๐Ÿ”น What Can MiniScript Do?
  • ๐Ÿ”น Trigger Types
  • ๐Ÿ”น Syntax Overview
  • ๐Ÿ”น Execution Modes
  • ๐Ÿงพ Looking for example scripts?
  1. ๐Ÿ“‚ Developers

Scripting System

Use MiniScript to add runtime behavior to URT3D assets โ€” from animations and interactions to custom event logic. Learn how to write, trigger, and debug scripts in Unity.

PreviousTraits SystemNextMiniScript Recipes

Last updated 1 month ago

๐Ÿ“˜ 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:

MiniScript is a lightweight scripting language built into the URT3D runtime. It lets you define dynamic logic that runs when an asset loads, updates, or responds to custom events โ€” no C# required.


๐Ÿ”น What Can MiniScript Do?

Use it to:

โ€ข Animate assets โ€ข React to clicks or hovers โ€ข Move or rotate objects โ€ข Communicate between assets โ€ข Delay or sequence actions โ€ข Run scripts per frame with Update()

Scripts are embedded inside .urta files and authored through the URT3D component in Unity or via external tools.


๐Ÿ”น Trigger Types

OnLoad Runs once when the asset is loaded.

OnUpdate Runs every frame.

OnCustomEvent Runs only when manually triggered.

Example (C#):

wrapper.TriggerCustomEvent("jump");

๐Ÿ”น Syntax Overview

Get a trait:

position = GetTrait("Position3d")

Set a value:

position.SetValue(Vector3(0, 1, 0))

Check for a trait:

if HasTrait("Animatable") then
    ...
end if

Trigger an event:

TriggerEvent("wave")
TriggerEventOn("wave", "npc_asset_guid")

Use a delay:

Delay(2.5)

๐Ÿ”น Execution Modes

Each script can be configured to run in one of the following:

โ€ข EditorOnly โ€“ Only in Unity Editor โ€ข RuntimeOnly โ€“ Only during Play Mode or builds โ€ข Both โ€“ Runs in all modes

Set this via the URT3D component in the Inspector.


๐Ÿงพ Looking for example scripts?

Includes:

๐Ÿ”น Animate on load ๐Ÿ”น Hover/click reactions ๐Ÿ”น Delayed events ๐Ÿ”น Cross-asset messaging ๐Ÿ”น Scripted state logic


Weโ€™ve collected real-world MiniScript patterns in one place. โ†’

๐Ÿ’ฌ Need Help? ๐Ÿ“ฉ Email us at:

โœ๏ธ
urt3d-sdk_unity โ€บ Documentation
MiniScript Recipes
๐Ÿ—จ๏ธ Join our Discord creator community
support@urt3d.com