Class DebugActionToggle
Toggle action will be represented as a button toggle in the debug menu with on/off status
Inheritance
System.Object
DebugActionToggle
Inherited Members [+/-]
. . .
Assembly: com.bennykok.runtime-debug-action.dll
Syntax
[Serializable]
public class DebugActionToggle : FluentAction<DebugActionToggle>
Examples
RuntimeDebugSystem.RegisterActions(
DebugActionBuilder.Toggle()
.WithName("PostProcessing")
.WithActionGet(() => GetCameraData().renderPostProcessing)
.WithActionSet((isOn) => GetCameraData().renderPostProcessing = isOn),
);
Fields
actionGet
Declaration
public Func<bool> actionGet
Field Value
Type |
Description |
System.Func<System.Boolean> |
|
actionSet
Declaration
public Action<bool> actionSet
Field Value
Type |
Description |
System.Action<System.Boolean> |
|
actionSwitch
Declaration
public Action actionSwitch
Field Value
Type |
Description |
System.Action |
|
isOn
Declaration
[Title("Toggle", 0)]
public bool isOn
Field Value
Type |
Description |
System.Boolean |
|
unityActionOff
Declaration
[CollapsedEvent(null)]
public UnityEvent unityActionOff
Field Value
Type |
Description |
UnityEngine.Events.UnityEvent |
|
Methods
GetDisplayStatus(Boolean)
Declaration
protected string GetDisplayStatus(bool isOn)
Parameters
Type |
Name |
Description |
System.Boolean |
isOn |
|
Returns
Type |
Description |
System.String |
|
ResolveAction()
Declaration
public override void ResolveAction()
Overrides
Setup()
Declaration
public override void Setup()
Overrides
WithActionGet(Func<Boolean>)
Declaration
public virtual DebugActionToggle WithActionGet(Func<bool> actionGet)
Parameters
Type |
Name |
Description |
System.Func<System.Boolean> |
actionGet |
|
Returns
WithActionSet(Action<Boolean>)
Declaration
public virtual DebugActionToggle WithActionSet(Action<bool> actionSet)
Parameters
Type |
Name |
Description |
System.Action<System.Boolean> |
actionSet |
|
Returns