A enhance version of HFSM.
This repository is built binary plugin, and under MIT license. There have not plan to public source code currently.
- Prefect visual editor.
- Visualized debugger.
- High perforamce, building base on GDExtension.
- Supports hierarchical nesting and can be used in complex situations.
- Diversified transition plans.
- Two development modes: signal callbacks and attached state scripts.
- Has ability of working with animaions( Can be an Animation State Mechine).
- Attch GDScript/CSharpScript to implement State Logic.
- Attch GDScript/CSharpScript to implement Transition Logic (full version only).
I have not time to write a prefect document and create some demos, I can only remain some hints here.
-
This plugin's basic concept is like the 3.x version, you can refer its document. But be careful, the has many naming different between these two plugins, and this 4.1 version have removed some over desined, such as "agent", and so on.
-
To start edit a
HFSM
node, your should create aFSMConfig
resource and set toHFSM
's propertyroot_fsm_config
. -
If you have some confuse when using this plugin, you may get answers/tips at the botton left of the "HFSM Editor" panel.
-
Pressing "Shift" and "Left Button" and drag from a State to another State to create a Transition.
-
Pressing "Alt" and "Mid Button" and drag and draw a line cross through Transitions to delete them.
-
Double left clike on a Transition to select and inspect it.
-
To debug
HFSM
, you can go toDebugger
panel'sHFSM
tab, the left side is runningHFSM
s node path, double click it to select aHFSM
and inspect it. -
According to the design, you should not access all
xxxConfig
classes, they are only store the HFSM structure/infomation for constructingHFSM
.FSMConfig StateConfig TransitionConfig VariableConfig VariableExpressionConfig
But this is not mandatory, if you access them, you should clearify what are you doing.
- You need build project at least onnce to elimitate error in C# scripts in
res://addons/com.daylily_zeleen.hfsm/CSharpWrappers/
. - It is recommended not to use with other langurage scripts.
- If you need cross langurages programing, when you access members about
HFSM
,State
,Variable
,Transition
, you should use menbers which hasNative
suffix. For example, a HFSM node with GDScript, and States in this HFSM node, it should useGetHFSMNative()
instead ofGetHFSM()
to access HFSM node in States, and theNode
you got fromGetHFSMNative()
can't be casted toHFSM
in C#.
- Currently is not stable version, please avoid to use this plugin in release purpose, I can't guarantee that it will work properly.
- All apis have possibility to be changed in future.
- Currently, you can't use
GDExtensionManager
,ResourceUID
,IP
singletonS in expression of Transition. - Welcome to use and give me feedback by opening issues.