Interface DirectorGame Creator 2 Module

#UI Toolkit Integration Guide

Interface Director features native, first-class support for Unity UI Toolkit alongside standard uGUI, powered by a decoupled, renderer-agnostic architecture.

#Renderer-Agnostic Architecture

The core runtime communicates with views exclusively through the IInterfaceViewBackend abstraction:

InterfaceDirector Runtime Manager
       │
       ▼
IInterfaceViewBackend (Abstraction)
 ├── uGUI Backend (Canvas, CanvasGroup, GraphicRaycaster)
 └── UI Toolkit Backend (UIDocument, PanelRenderer, VisualElement)

#Unity Version Compatibility

Unity Version UI Toolkit Host Engine Recommended Spaces Capability
Unity 6.0 – 6.4 UIDocument Screen Space Overlay, Camera, World Anchored Full Screen Space & 3D Anchor Support
Unity 6.5+ PanelRenderer + UIDocument All 4 Spaces (including native 3D World Space) Ultimate UI Toolkit Experience

Tip
Unity 6.5 Upgrade Recommendation: Unity 6.5 introduces the native PanelRenderer component, enabling true 3D scene meshes for UI Toolkit without intermediate RenderTexture assets.

#Generating a UI Toolkit View

On your Interface Asset, click Create UI Toolkit View. Interface Director automatically creates:

  • {InterfaceName} View.prefab with UIDocument and UIToolkitInstructionBinder.
  • {InterfaceName} Layout.uxml with pre-configured headers, cards, and buttons.
  • {InterfaceName} Layout.uss with glassmorphic styles, hover animations, and dark/light accents.
  • Assigns the project's Default PanelSettings.

#Zero-Code Instruction Binding

The UIToolkitInstructionBinder component lets designers wire Game Creator Actions directly to UXML buttons without writing C#:

  • Maps element names (e.g. #btn-play, #btn-exit) or USS classes to Game Creator Actions.
  • Built-in click spam protection and disable-on-click rules.
  • Automatic element resolution and validation in the Inspector.

#Focus Management

Interface Director supports flexible focus targeting strategies for gamepad and keyboard navigation:

  • Element Name: Focuses an exact element ID (e.g. btn-continue).
  • USS Class Name: Focuses the first element matching a CSS class.
  • UQuery Selector: Advanced query selector.
  • First Focusable: Automatically finds and focuses the first interactive button or input.

#C# Pro Controller: UIToolkitViewController

For custom scripting, inherit from UIToolkitViewController to gain strongly-typed lifecycle hooks:

public class InventoryUIController : UIToolkitViewController
{
    protected override void OnViewOpen(InterfaceHandle handle, object payload)
    {
        var root = RootVisualElement;
        // Populate inventory slots dynamically
    }
}