• Manual
  • Scripting API
Show / Hide Table of Contents
  • ScriptableFramework
    • AnimatorList
    • AnimatorListPopulator
    • AnimatorReference
    • AnimatorReferencePopulator
    • AppEvent
    • AppEvent<T>
    • AppEventBase
    • AppEventListener
    • AppEventListener<T>
    • AppEventListenerBase
    • AppVersion
    • BoolEvent
    • BoolEventListener
    • BoolList
    • BoolResponse
    • BoolValue
    • BoundsEvent
    • BoundsEventListener
    • BoundsResponse
    • ColorEvent
    • ColorEventListener
    • ColorList
    • ColorResponse
    • ColorValue
    • DataString
    • DefaultState
    • Dragable
    • Extensions
    • FloatEvent
    • FloatEventListener
    • FloatList
    • FloatResponse
    • FloatValue
    • FoldoutAttribute
    • GameObjectList
    • GameObjectListPopulator
    • GameObjectReference
    • GameObjectReferencePopulator
    • InputValidation
    • IntEvent
    • IntEventListener
    • IntList
    • IntResponse
    • IntValue
    • IReferenceContainer
    • IValueContainer
    • MeshRendererList
    • MeshRendererListPopulator
    • MeshRendererReference
    • MeshRendererReferencePopulator
    • PathType
    • Platform
    • ReferenceItem<T>
    • ReferenceList<T>
    • ReleaseType
    • RuntimeItem<T>
    • RuntimeList<T>
    • RuntimeObject
    • RuntimeObjectManager
    • SceneAsset
    • SceneAsset.SceneLoadException
    • SearchableEnumAttribute
    • StateChange
    • StateMachine
    • StateMachineBase
    • StateMachineController
    • StateMachineReset
    • StateToggle
    • StringEvent
    • StringEventListener
    • StringList
    • StringResponse
    • StringValue
    • TransformList
    • TransformListPopulator
    • TransformReference
    • TransformReferencePopulator
    • ValueItem<T>
    • ValueList<T>
    • Vector2Event
    • Vector2EventListener
    • Vector2List
    • Vector2Response
    • Vector2Value
    • Vector3Event
    • Vector3EventListener
    • Vector3List
    • Vector3Response
    • Vector3Value
  • ScriptableFramework.CustomEditors
    • AppEventEditor
    • AppEventListenerEditor
    • AppVersionEditor
    • DataStringEditor
    • EditorOverride
    • EditorOverride.Cache
    • EditorOverride.Colors
    • FrameworkExtensions
    • RuntimeObjectEditor
    • RuntimeObjectManagerEditor
    • SceneAssetEditor
    • SearchableEnumDrawer
    • SearchablePopup
  • ScriptableFramework.Tests
    • AppEventGenericTests
    • AppEventGenericTests.ClearData
    • AppEventGenericTests.RaiseEvent
    • AppEventGenericTests.RegisterListener
    • AppEventGenericTests.UnregisterListener
    • AppEventListenerGenericTests
    • AppEventListenerGenericTests.OnEventRaised
    • AppEventListenerGenericTests.RegisterSelf
    • AppEventListenerGenericTests.UnregisterSelf
    • AppEventListenerTests
    • AppEventListenerTests.OnEventRaised
    • AppEventListenerTests.RegisterSelf
    • AppEventListenerTests.UnregisterSelf
    • AppEventTests
    • AppEventTests.ClearData
    • AppEventTests.RaiseEvent
    • AppEventTests.RegisterListener
    • AppEventTests.UnregisterListener
    • DataStringTests
    • ListenerResponder
    • ReferenceItemTests
    • ReferenceItemTests.ClearData
    • ReferenceItemTests.ClearWithForAssetReferencingOnly
    • ReferenceListTests
    • ReferenceListTests.ClearData
    • ReferenceListTests.ClearWithForAssetReferencingOnly
    • StateMachineTests
    • StateMachineTests.ClearData
    • StateMachineTests.ReapplyState
    • StateMachineTests.UpdateStateForAll
    • StateMachineTests.UpdateStateForIndex
    • StateMachineTests.UpdateStateForRange
    • StateMachineTests.UpdateStateForSingle
    • StateToggleTests
    • StateToggleTests.RespondToStateMachineChange
    • StateToggleTests.UpdateStateMachine
    • StringListTests
    • ValueItemTests
    • ValueItemTests.ClearData
    • ValueListTests
    • ValueListTests.ClearData

Class StateToggle

A helper component designed for quickly allowing control over a StateMachine by hooking it up to Toggles through dynamic function assignment. The Toggle would also respond to changes made to the StateMachine.

Inheritance
System.Object
StateToggle
Namespace: ScriptableFramework
Assembly: cs.temp.dll.dll
Syntax
public class StateToggle : MonoBehaviour

Fields

events

An array of events to collectively run when the toggle is fired.

Declaration
public AppEvent[] events
Field Value
Type Description
AppEvent[]

stateMachine

The StateMachine being controlled.

Declaration
public StateMachine stateMachine
Field Value
Type Description
StateMachine

Methods

RespondToStateMachineChange(Int32)

If the StateMachine were to be updated through some other means, use this function as a response to an int event and pass that value here to make the Toggle reflect the state of the StateMachine.

Declaration
public void RespondToStateMachineChange(int activeIndex)
Parameters
Type Name Description
System.Int32 activeIndex

UpdateStateMachine(Boolean)

The Toggle calls this function to update the StateMachine state according to its sibling index.

Declaration
public void UpdateStateMachine(bool value)
Parameters
Type Name Description
System.Boolean value
Back to top Generated by DocFX