If you have ever built an environmental puzzle or mechanical base-building system, you know the frustration of handling interactable props from scratch. Setting up custom pivot points, writing angle-clamping logic, handling audio trigger thresholds, and hooking up emissive state toggles for individual switches can quickly eat up days of dev time. The Switches, Levers & Valves package directly addresses this workflow bottleneck by delivering a plug-and-play library of physical controls with pre-configured pivots, physics-friendly geometry, and modular interaction scripts.
In my experience building immersive first-person mechanics, the biggest pitfall with asset store prop packs is sloppy axis alignment or rigid, animation-only mechanics that don't allow variable player speed. This asset gets the architecture right: every model is authored with clean target rotation origins, making physics-driven dragging or programmatic tweening straightforward. The high-level pipeline separates physical mesh hierarchies from logical state controllers, letting you bind C# events straight to the movement states without writing boilerplate math every single time.
This package offers a well-balanced mix of aesthetic detail and solid C# script architecture tailored for real-time projects.
Each mesh in this pack—whether a double-throw breaker, modern wall toggle, or industrial valve—is constructed with hardware zeroing in mind. The pivots are placed precisely at hinge pins and central rotators rather than at the mesh's center bounds. This design choice saves you from having to create empty parent game objects just to manage local rotation transforms.
The asset ships with metallic-smoothness PBR texture sets (2048x2048 resolution) along with custom surface shaders handling dynamic indicator lights. Emissive channel masking allows switch LEDs to switch dynamically from inactive amber to bright green without requiring duplicate material instances in memory. Converting the included materials from Built-in to Universal Render Pipeline (URP) or High Definition Render Pipeline (HDRP) takes only a quick batch converter run via Unity's Render Pipeline Converter tool.
The included scripts direct update-loop polling in favor of dynamic UnityEvents. The primary interactable components expose clean delegate hooks like OnStateChanged(bool) and OnValueNormalized(float). Key features include:
0.0f and 1.0f based on total rotation angle limits.This collection works best in games where tactical or puzzle interactions demand physical, mechanical feedback from the environment:
Here is how to get a mechanical pressure valve and breaker switch running in your scene using a custom controller listener.
Navigate to Assets/SwitchesLeversValves/Prefabs/ and drag a valve or switch into your scene hierarchy. Ensure your player character has a raycast or interaction component pointing toward the object's Collider layer.
Select the switch prop and review the attached script in the Inspector. Set the Rotation Axis (typically local X or Z depending on the switch style), define the Min/Max Angles (e.g., -45 to 45 degrees), and check Snap To Nearest State if you want direct binary toggling.
Attach the following script to an overhead manager object (such as a door controller or power grid manager) to handle logic when a player toggles a switch or turns a valve:
using UnityEngine;
using UnityEngine.Events;
namespace GameMechanics
{
public class PowerGridController : MonoBehaviour
{
[Header("Interactive Targets")]
[SerializeField] private GameObject switchObject;
[SerializeField] private GameObject valveObject;
[Header("System Callbacks")]
public UnityEvent onPowerRestored;
private bool isBreakerActive = false;
private float valveOpenPercentage = 0.0f;
// Call this method via UnityEvent on the Switch component's OnToggleStateChanged(bool)
public void SetBreakerState(bool isActive)
{
isBreakerActive = isActive;
Debug.Log($"Breaker state updated to: {isBreakerActive}");
EvaluatePowerGrid();
}
// Call this method via UnityEvent on the Valve component's OnValueNormalized(float)
public void SetValveProgress(float progress)
{
valveOpenPercentage = Mathf.Clamp01(progress);
Debug.Log($"Valve open ratio: {valveOpenPercentage * 100f}%");
EvaluatePowerGrid();
}
private void EvaluatePowerGrid()
{
if (isBreakerActive && valveOpenPercentage >= 0.85f)
{
Debug.Log("Power grid conditions met. Initiating systems...");
onPowerRestored?.Invoke();
}
}
}
}
Here is an honest breakdown of where this package shines and where you might need to adjust things depending on your project scope:
UnityEvents, making it easy to hook them into custom interaction frameworks without rewriting code.Open your Unity project, go to Window > Rendering > Render Pipeline Converter, select Built-in to URP (or HDRP), check Material Upgrade, and click Convert Assets. Unity will automatically remap the standard PBR textures to your current target pipeline shaders.
Yes. Because the models feature clean local rotation axes and detached geometry, you can easily remove the default C# scripts and attach components like XR Interaction Toolkit's XR Knob or XR Lever directly to the child transforms.
Assets accessed on this platform are provided strictly for educational, testing, and evaluation purposes only—never for commercial production releases. If you intend to launch a commercial game using these assets, please purchase an official license from the Unity Asset Store to support the original content creators.