Skip to content

Interactables Tab

Fynn9563 edited this page Jan 30, 2026 · 3 revisions

Interactables Tab

Video Tutorial

Coming soon - video tutorial placeholder

The Interactables tab helps you create interactive objects with persistent state.

Smart Toggles

A Smart Toggle (StrangeToggle) is an interactive component that remembers its state per player.

Features

  • Persistent State - Remembers on/off state between sessions
  • Visual Feedback - Toggle objects, emission colors, animators
  • Audio Feedback - Play sounds on toggle
  • VRChat Integration - Works with VRChat's Interact system

Adding a Smart Toggle

  1. Select the object(s) you want to make interactive
  2. Go to the Interactables tab
  3. Click Add Smart Toggle Component

The component will be added with:

  • Auto-generated persistence ID
  • Link to scene's StrangeHub
  • Self-reference in toggle objects

Configuring the Toggle

Select the object with StrangeToggle and configure in the Inspector. Settings are organized into 4 expandable sections:

Action Section

Property Description
Toggle Objects GameObjects to activate/deactivate
Emission Renderers Renderers with emission to toggle
Emission On Color Emission color when ON
Emission Off Color Emission color when OFF
Animators Animator components to sync
Animator Bool Param Name of the bool parameter to set

Feedback Section

Property Description
Sound Source AudioSource component to play sounds
On Sound AudioClip to play when toggled ON
Off Sound AudioClip to play when toggled OFF

Brain Section

Property Description
Default On Starting state when no saved state exists
Global Sync Sync toggle state to all players (mutually exclusive with persistence)
Use Persistence Save state per-player across sessions (mutually exclusive with global sync)
Persistence ID Unique identifier for state saving (only shown when persistence is enabled)
Scene Hub Reference to the StrangeHub (auto-linked)

Global Sync vs Persistence

Smart Toggles support two modes:

Global Sync - State syncs to all players including late joiners

  • When one player toggles, all players see the change
  • Late joiners see the current state
  • No per-player memory

Persistence - State saved per-player

  • Each player has their own toggle state
  • State persists across sessions
  • Other players don't see your toggles

Trigger Section

Property Description
Collider Interaction collider (add via inspector buttons)
UI Toggle World-space UI toggle (add via inspector buttons)

World-Space UI Toggle

Create a VRChat-compatible world-space UI toggle for your Smart Toggle:

  1. Select the toggle object
  2. Click Add UI Toggle in the inspector
  3. A Canvas with VRCUiShape, checkmark indicator, and TextMeshPro label is created
  4. The checkmark is automatically added to the toggle objects array

Remove UI Toggle: Click to remove the created UI elements

Prefab Instance Handling

When working with prefab instances, the inspector shows an Unpack Prefab option when modifications require unpacking.

How Persistence Works

  1. Player interacts with toggle
  2. New state is saved to StrangeHub with the persistence ID
  3. When the player rejoins, state is restored

Note: Persistence is per-player, not global. Each player has their own saved state. Use Global Sync if you want all players to see the same state.

Editor Visualization

In the Scene view, StrangeToggle shows:

  • Yellow icon at the toggle position
  • Cyan line connecting to StrangeHub
  • Lines to all target objects

This helps visualize connections without selecting the object.

Use Cases

Light Switch

Toggle Objects: [Light GameObject]
Sound Source: AudioSource on switch
On Sound: click_on.wav
Off Sound: click_off.wav

Emission Toggle (Neon Sign)

Emission Renderers: [Sign Renderer]
Emission On Color: Bright pink
Emission Off Color: Black
Use Persistence: true

Animated Door

Animators: [Door Animator]
Animator Bool Param: "IsOpen"
Toggle Objects: [Door Collider] (disable when open)

Complex Setup (Multiple Targets)

Toggle Objects: [Light1, Light2, Effect]
Emission Renderers: [Button Renderer]
Animators: [ButtonAnimator, EffectAnimator]
Animator Bool Param: "Active"
On Sound: activate.wav
Off Sound: deactivate.wav

Best Practices

Persistence IDs

  • Use descriptive IDs: bedroom_light, front_door
  • Ensure IDs are unique across your world
  • Don't change IDs after publishing (breaks saved states)

Performance

  • Limit the number of toggle objects per toggle
  • Use animators for complex state changes
  • Avoid toggling heavy objects frequently

Audio

  • Keep toggle sounds short (< 1 second)
  • Use appropriate volume levels
  • Consider spatial audio settings on the AudioSource

Testing

  • Test toggles in VRChat, not just the editor
  • Verify persistence by leaving and rejoining
  • Test with multiple users to ensure per-player state works

Clone this wiki locally