Togglers are special scripts for toggling objects. They are often used in qASIC to support other input systems.
Creating your own Toggler
If the built in togglers aren't enough, you can create your own. By inheriting the
Static Toggler class you can change how it toggles objects.
public class ExampleToggler : Toggler
[KeyCodeListener] public KeyCode key;
protected override void HandleInput()
|Toggler||Base toggler that stays in the scene.|
|Static Toggler||Toggler that moves from scene to scene.|
Built in Togglers
|Toggler Basic||Normal Toggler that uses KeyCodes. Works with the new Unity Input System.|
|Toggler Remappable||Toggler that works with the qASIC Input System, where you can remap the button in game.|
|Static Toggler Basic||Toggler Basic that moves from scene to scene.|
|Static Toggler Remappable||Toggler Remappable that moves from scene to scene.|
These scripts are responsible for activating and controlling togglers.
Before you can use it, you'll have to make sure all of the togglers which will be used by the controller are set to the
Built in toggler controllers
|Platform Toggler Controller||This controller uses a different toggler for different platforms. The most common use case for it is changing the pause menu key on WebGL, because the industry standard |