Skip to content

Interactables Tab

Fynn9563 edited this page Jan 28, 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:

Basic Settings

Property Description
Persistence ID Unique identifier for state saving
Use Persistence Enable/disable state saving
Default On Starting state when persistence is disabled or no saved state exists
Scene Hub Reference to the StrangeHub (auto-linked)

Visual Targets

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

Audio

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

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.

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