API
Runtime Studio uses modules to register extensions. The same pattern is used by the optional plugins, so it is the normal starting point for project-specific runtime editor features.
using System;
using Fullscreen.RuntimeStudio.Runtime;
using Fullscreen.RuntimeStudio.Runtime.UI.ComponentDrawers;
using UnityEngine;
public sealed class ExampleComponent : MonoBehaviour
{
public float Value = 1f;
}
public sealed class ExampleComponentDrawer : IRuntimeComponentDrawer
{
public Type ComponentType => typeof(ExampleComponent);
public void Draw(ComponentDrawerContext context, Component component)
{
var example = component as ExampleComponent;
if (example == null)
{
return;
}
context.DrawFloat("Value", example.Value, value => example.Value = value, 0.1f);
}
}
public sealed class ExampleModule : IEditorModule
{
public void Register(EditorModuleBuilder builder)
{
builder.AddDefaultComponentDrawer(new ExampleComponentDrawer());
}
}IEditorModulePriority controls registration order, and IEditorModulePrewarm lets a module prepare work before the editor is used. EditorModules can register, prewarm, discover loaded modules, and reset registered modules.
API groups
The public API is grouped by purpose:
- Module registration:
IEditorModule,IEditorModulePriority,IEditorModulePrewarm,EditorModules, andEditorModuleBuilder. - UI and layout:
IEditorPanel,IEditorView,PanelDefinition,PanelDock, panel registries, inspector groups, hierarchy adornments, scene tools, and Scene Settings menu items. - Component drawing:
IRuntimeComponentDrawer,IRuntimeComponentDrawerMetadata,ComponentDrawerContext,IRuntimePropertyDrawer,PropertyDrawerContext, andFieldInspector. - Persistence and undo:
SceneSaveManager,SceneSaveJson,RuntimeStudioPackage,RuntimeStudioFileTransfer,RuntimeStudioUndo, component state adapters, andSerializedNodeUtility. - Runtime integration:
IRuntimeIntegration,RuntimeIntegration, integration priorities, scene overlay drawing, and object placement contexts. - Assets and importing:
IRuntimeAssetLibrary,EditorAssetLibrary,IAssetReferenceResolver, runtime importers, import requests, imported assets, and runtime imported asset libraries. - Settings and type filtering:
RuntimeStudioSettings, settings module definitions, module IDs, type filter categories, type icon providers, and the type catalog.
Choose an extension point
| Need | API |
|---|---|
| Create a panel | IEditorPanel and PanelDefinition |
| Add a Scene View button | SceneToolOverlayItem |
| Add a Scene Settings entry | SceneSettingsMenuItem |
| Draw a Unity component | IRuntimeComponentDrawer |
| Draw a nested type | IRuntimePropertyDrawer |
| Add a Hierarchy icon | HierarchyAdornmentDefinition |
| Add a Hierarchy right-click action | IRuntimeHierarchyContextAction |
| Save a custom component | IComponentStateAdapter |
| Control edit isolation | RuntimeIntegration |
| Resolve external assets | IRuntimeAssetLibrary and IAssetReferenceResolver |
| Import a custom file format | IAssetImportProcessor |
EditorModuleBuilder registers the supported extension types. Use an AddDefault... method when the extension should use the normal Runtime Studio registration behaviour. Registries are available when a project needs direct control.
The API also exposes built-in IDs such as BuiltInPanelIds, BuiltInEditorFeatureIds, and BuiltInSceneSettingsMenuIds. Use them when an extension needs to work with a built-in panel, feature, or menu location.