Commit Graph

300 Commits

Author SHA1 Message Date
mikko mononen
ef148ecd80 StateTree: StateTree UI spring clean.
- Added icons and icon colors for ST nodes
- Implemented icons for some common ST nodes
- Small update to ST logic icons
- Added icons to the task list in State treeview row, adjusted task list BG color to make icons visible
- Fixed ST editor tabs icons and names (e.g. there were two tabs that had the same label)
- Moved ST node picker to separate class
- Moved category array customization to common helper function
- Added node icons to the ST node picker
- Add node button is not node selector too (simila to Niagara)
- Consolidated the add button style across all lists
- Cleaned up the node customization
  - Moved type selector, debug, and property controls into one menu at right
  - The combined menu can be also summoned using right click
  - Renaming now has to be triggered via the menu
  - Replacing node happens via menu
  - Most of the row was left "clickable" to later use it for selection
  - Improved the visualization and controls for the expression indentation
- Cleaned up state customization
  - Moved parameters to own category (similar to the tree params)
  - Moved event to the enter conditions category
- Cleaned up transition customization
  - Improved the transition display
  - Consolidated add button styles

#jira UE-180608
#rb Juan.Portillo, Mieszko.Zielinski

[CL 33030431 by mikko mononen in ue5-main branch]
2024-04-17 03:01:36 -04:00
jacob wang
c641fa607f [State Tree] Uniformly Random State Selection
- Added a new option for selecint child at uniform random in StateTreeStateSelectionBehavior
- Added RandomStream in StateTreeInstanceData and relevant APIs to get stream and set seed
#rb mikko.mononen

[CL 33006455 by jacob wang in ue5-main branch]
2024-04-16 13:30:24 -04:00
guillaume arruda
4f79176477 Add compile in StateTree PostLoad and compile on PIE begin to state tree so that the trees are never out of sync with the editor state in game
Add validation warning if the state tree is not compiled to prevent uncompiled state tree to be submitted
#rb mikko.mononen

[CL 33001894 by guillaume arruda in ue5-main branch]
2024-04-16 11:14:34 -04:00
guillaume arruda
1c7f123911 Mark FStateTreeReference BlueprintType
#rnx

#rb mikko.mononen

[CL 32998046 by guillaume arruda in ue5-main branch]
2024-04-16 08:28:26 -04:00
mikko mononen
9bcda384a4 StateTree: Fix parameter handling entering to a subtree directly.
- When transitioning to a subtree directly, self host the parameters
- Made transitioning to a subtree directly a warning, may make it an error in future versions

#jira UE-211189
#rb Yoan.StAmant

[CL 32969399 by mikko mononen in ue5-main branch]
2024-04-15 08:23:17 -04:00
mikko mononen
2b93815d0a StateTree: Improved event handling
- Added support for shared event buffer, so that multiple instance data can use the same
- Added API to consume events
- Removed double buffering from events
- Treat TriggerTransitions() as event handler (events flushed after each call to the method)
- Event handlers (including tasks) are executed in priority order
- Transitions and event capturing states can consume events on successful selection
- Added API to tick a StateTree in two passes (update tasks and trigger transitions)
- Change parallel tree tasks to do the task update in Tick(), and event handling in TriggerTransitions()
- Small improvements to the ST debugger to display events
- NOTE: this is breaking change for implementations that has relied events emitted during tick to be available on next EnterState()

#okfirgithub public
#rb Yoan.StAmant

[CL 32924765 by mikko mononen in ue5-main branch]
2024-04-12 06:04:01 -04:00
mikko mononen
551d9cb46d StateTree: Fix stack-use-after-scope
#jira UE-210969
#rb Mieszko.Zielinski

[CL 32876371 by mikko mononen in ue5-main branch]
2024-04-11 04:38:59 -04:00
mikko mononen
2d865a3f7e StateTree: Fix duplicate LOCTEXT
#jira UE-211740

[CL 32873134 by mikko mononen in ue5-main branch]
2024-04-11 02:20:18 -04:00
mikko mononen
2cd00ea993 StateTree: Added description to tasks and conditions.
#rb guillaume.arruda, Mieszko.Zielinski

[CL 32754702 by mikko mononen in ue5-main branch]
2024-04-05 04:18:10 -04:00
mikko mononen
b888b0f394 StateTree: Added automatic description to tasks and conditions.
#rb Mieszko.Zielinski

[CL 32754463 by mikko mononen in ue5-main branch]
2024-04-05 03:37:02 -04:00
mikko mononen
d5ede881de StateTree: Fix FStateTreePropertyRef example to guide correct type usage
- Fix FStateTreePropertyRef types in Env Query Task
- Fix too eager PVS warning

[CL 32754191 by mikko mononen in ue5-main branch]
2024-04-05 02:53:00 -04:00
mikko mononen
5e4d3a8a6c [Backout] - CL32744797
[FYI] bob.tellez
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL32723276
[FYI] mikko.mononen
Original CL Desc
-----------------------------------------------------------------
StateTree: Made parent state required events and enter conditions to be evaluated when transition leads directly to it's child. (contributed)

[CL 32754072 by mikko mononen in ue5-main branch]
2024-04-05 02:16:32 -04:00
bob tellez
adaa2e290a [Backout] - CL32723276
[FYI] mikko.mononen
Original CL Desc
-----------------------------------------------------------------
StateTree: Made parent state required events and enter conditions to be evaluated when transition leads directly to it's child. (contributed)

[CL 32744822 by bob tellez in ue5-main branch]
2024-04-04 17:51:12 -04:00
mikko mononen
b67864e0ad StateTree: Made parent state required events and enter conditions to be evaluated when transition leads directly to it's child. (contributed)
[CL 32723281 by mikko mononen in ue5-main branch]
2024-04-04 07:01:38 -04:00
guillaume arruda
83b26c43f3 Add support for state tree override in StateTreeRunParallelStateTreeTask
#rnx
#rb mikko.mononen

[CL 32693651 by guillaume arruda in ue5-main branch]
2024-04-03 07:16:44 -04:00
alex kahn
593a09d09d [Backout] - CL32585960 - CIS Compile Error
#rnx
[FYI] Steve.Robb
Original CL Desc
-----------------------------------------------------------------
Added FUtf8StrProperty and FAnsiStrProperty.

#rb robert.manuszewski
#jira UE-204743

[CL 32590075 by alex kahn in ue5-main branch]
2024-03-28 15:39:39 -04:00
steve robb
33f991cfd9 Added FUtf8StrProperty and FAnsiStrProperty.
#rb robert.manuszewski
#jira UE-204743

[CL 32586529 by steve robb in ue5-main branch]
2024-03-28 14:26:59 -04:00
mikko mononen
91012bfa0b StateTree: Added linked state overrides.
- Added ability to describe override table for linked state tree references
- This allows to override parts of the tree e.g. based on character type
- Fixed visibility of the State parameter button when in fixed mode

#rb guillaume.arruda

[CL 32572125 by mikko mononen in ue5-main branch]
2024-03-28 05:18:19 -04:00
mikko mononen
0cdc2e12b9 StateTree: Fix active instance data access when during selection.
#rb Mieszko.Zielinski
#lockdown julien.marchand

[CL 32545460 by mikko mononen in ue5-main branch]
2024-03-27 11:51:13 -04:00
guillaume arruda
16b1c302aa Add meta tag SchemaCanBeOverriden on StateTreeReference to make IStateSchemaProvider an opt in feature
#rb Yoan.StAmant

[CL 32436239 by guillaume arruda in ue5-main branch]
2024-03-22 11:55:18 -04:00
guillaume arruda
7fb2ffb953 Fix LinkedAsset schema check that was inversed leading to subtree with looser requirement being rejected
#rnx
#rb Yoan.StAmant

[CL 32435908 by guillaume arruda in ue5-main branch]
2024-03-22 11:44:33 -04:00
mikko mononen
d92da1ba2f StateTree: Fixed non initialized state params when checking it's enter conditions
[CL 32429459 by mikko mononen in ue5-main branch]
2024-03-22 06:34:36 -04:00
yoan stamant
73e3be5b16 Added unsafe type cast as warnings in AI related plugins/modules: StateTree, Mass, SmartObject. NavigationSystem, and ZoneGraph (partial)
#rb Mieszko.Zielinski, mikko.mononen

[CL 32398227 by yoan stamant in ue5-main branch]
2024-03-21 09:44:11 -04:00
guillaume arruda
5b085806fd Add postload callback to state tree node in editor
Use callback to sync parameters in FStateTreeRunParallelStateTreeTask
#rb mikko.mononen
#rnx

[CL 32396757 by guillaume arruda in ue5-main branch]
2024-03-21 08:38:57 -04:00
mikko mononen
a1a41e832c StateTree: Fixed missing template keyword in dependent template call
[CL 32393780 by mikko mononen in ue5-main branch]
2024-03-21 04:25:59 -04:00