How langxiyi/flowstateplugin works
FlowStateMachine is an Unreal Engine state-machine plugin with a graph-based authoring editor, runtime state/node model, shared data and metadata, asset creation, Blueprint nodes, and widget-layer helpers. The principal workflow is to author a machine graph, compile graph nodes into runtime nodes, then use the machine and its shared data during gameplay. The excerpts substantiate graph-to-runtime conversion and common-data access; most runtime execution and widget wiring were not sampled, so those connections are omitted.
Main entry points: FSMGraph.cpp Machine graph · FlowStateMachineFactories.cpp Asset factories · FSMCommonDataManager.cpp Data manager · FSMGraphEditor.cpp Graph editor
Components 25
Graph authoring
- Graph editor
Source/FlowStateMachine_Editor/Private/FSMGraphEditor.cpp - Machine graph
Source/FlowStateMachine_Editor/Private/Graph/FSMGraph.cpp - Graph nodes
Source/FlowStateMachine_Editor/Private/Node/FSMGraphNodeBase.cpp - Graph schema
Source/FlowStateMachine_Editor/Private/Graph/Schema/EdGraphSchema_FSM.cpp
State runtime
- Runtime node model
Source/FlowStateMachine/Private/RuntimeNode/FSMRuntimeNode.cpp - State nodes
Source/FlowStateMachine/Private/RuntimeNode/FSMRuntimeNode_State.cpp - Composite nodes
Source/FlowStateMachine/Private/RuntimeNode/FSMRuntimeNode_Composites.cpp - Jump node
Source/FlowStateMachine/Private/RuntimeNode/Composites/FSMRuntimeNode_Jump.cpp - Runtime subnodes
Source/FlowStateMachine/Private/RuntimeNode/FSMRuntimeSubNode.cpp - State services
Source/FlowStateMachine/Private/RuntimeNode/FSMRuntimeSubNode_Service.cpp - State machine
Source/FlowStateMachine/Private/SM/FlowStateMachine.cpp - Execution context
Source/FlowStateMachine/Private/SM/FlowStateContext.cpp
Shared data
- Common data asset
Source/FlowStateMachine/Private/Data/FSMCommonData.cpp - Data manager
Source/FlowStateMachine/Private/SM/FSMCommonDataManager.cpp - Typed values
Source/FlowStateMachine/Private/Data/CommonDataType/FSMCommonDataType.cpp
Assets and metadata
- Metadata fragments
Source/FlowStateMachine/Private/Data/DataFragments/FSMMetaDataFragment_Assets.cpp - Metadata asset
Source/FlowStateMachine/Private/Data/FSMMetaDataAsset.cpp - Asset factories
Source/FlowStateMachine_AssetType/Private/Factories/FlowStateMachineFactories.cpp - Asset type actions
Source/FlowStateMachine_AssetType/Private/FlowStateMachine_AssetType.cpp
Blueprint and UI
- Blueprint nodes
Source/FlowStateMachine_Node/Private/Nodes/K2Node_SpawnAndBindActor.cpp - Gameplay actions
Source/FlowStateMachine/Private/Actions/Actions_CreateWidgets.cpp - Widget layers
Source/FlowStateMachine_Widget/Private/Widgets/FlowStateWidgetLayerManager.cpp - Widget layout
Source/FlowStateMachine_Widget/Private/Widgets/FlowStateLayoutWidget.cpp
Other components
- Designer
- Game / Blueprint
Connections 14
- Designer → Graph editor: authors in
- Graph editor → Machine graph: opens graph
Source/FlowStateMachine_Editor/Private/FSMGraphEditor.cpp - Machine graph → Graph nodes: refreshes nodes
Source/FlowStateMachine_Editor/Private/Graph/FSMGraph.cpp - Machine graph → Runtime node model: builds runtime
Source/FlowStateMachine_Editor/Private/Graph/FSMGraph.cpp - Asset factories → State machine: creates machine
Source/FlowStateMachine_AssetType/Private/Factories/FlowStateMachineFactories.cpp - Asset factories → Metadata asset: creates metadata
Source/FlowStateMachine_AssetType/Private/Factories/FlowStateMachineFactories.cpp - Data manager → Common data asset: duplicates asset
Source/FlowStateMachine/Private/SM/FSMCommonDataManager.cpp - Data manager → Typed values: reads and sets
Source/FlowStateMachine/Private/SM/FSMCommonDataManager.cpp - Metadata fragments → Metadata asset: uses fragments
- Game / Blueprint → State machine: runs machine
- Game / Blueprint → Blueprint nodes: uses nodes
- Gameplay actions → Widget layout: creates widgets
- Widget layers → Widget layout: exposes layers
- Asset type actions → Asset factories: registers actions