For the complete documentation index, see llms.txt. This page is also available as Markdown.

Integrating a Component into Runtime Studio

This guide explains how to take a normal Unity component and make it fully work inside Runtime Studio.

You will learn how to:

  • Make a component visible in the inspector

  • Enable editing in runtime UI

  • Support saving and loading

  • Handle runtime isolation (muting)

  • Keep data stable across sessions


Step 1: Start with a Normal Component

You do not need to change your component structure.

public sealed class CharacterStats : MonoBehaviour
{
    public float Health = 100f;
    public float Attack = 10f;
    public float Defense = 5f;
}

At this point, Runtime Studio does nothing with it yet.


Step 2: Make It Visible in Runtime Studio

To make a component appear in Runtime Studio, you create a Component Drawer.

Think of this as:

“How should this component look and behave in the inspector?”

Now the component is:

  • Visible in Runtime Studio Inspector

  • Editable in real time

  • Integrated with selection system


Step 3: Register the Drawer

That is enough to make the component show up.


Step 4: Understand What You Get for Free

Once a drawer exists, Runtime Studio automatically gives you:

Built-in behavior

  • Undo / redo for field changes

  • Inspector layout handling

  • Selection refresh

  • Multi-object editing support

  • Value change tracking


Step 5: Decide How Saving Should Work

Runtime Studio automatically saves simple components.

If your component is like this:

Then:

You already get save and load support automatically.

No extra code required.


Step 6: When You Need Custom Save Logic

Sometimes automatic saving is not enough.

Use a Component State Adapter when:

  • You want to save only part of the data

  • You want version-safe saves

  • You want custom formats (like IDs instead of references)

  • You want to exclude runtime-only fields


Example: Custom Save Behavior

Instead of saving everything, we control what gets stored.

Now you fully control what gets saved.


Step 7: Handle Runtime Behavior (Important)

Some components need setup after loading or placement.

For example:

  • resetting values

  • rebuilding references

  • initializing runtime-only systems

You do this using Runtime Integration hooks.


Step 8: Understand Edit Isolation (Muted Components)

This is one of the most important concepts.

The problem

Without isolation:

  • AI keeps running

  • movement continues

  • timers update

  • physics changes state

This breaks the runtime editing.


The solution

Runtime Studio temporarily “mutes” gameplay logic during editing.

You control how this works:

Last updated