26 Commits

Author SHA1 Message Date
yoan stamant
0442a17cb8 [StateTreeDebugger]
- added option to disable state transitions
- added state transition breakpoints
- fixed scrubbing not using the right time (analysis time instead of world simulation time) when hitting a breakpoint
- fixed new instance auto selection on record when previous selection is a stale subtrack
- added console variable `statetree.displayitemids` to display states, tasks and transitions Ids in the StateTreeEditor (details view and state treeview)
#rb mikko.mononen

[CL 26147565 by yoan stamant in 5.3 branch]
2023-06-21 10:02:02 -04:00
yoan stamant
dfdc26f0d4 [StateTree] added possibility to disable States and Tasks. Also possible to force condition result to true/false.
#jira UE-187154
#rb mikko.mononen

[CL 25796491 by yoan stamant in ue5-main branch]
2023-06-05 13:12:19 -04:00
mikko mononen
51aa286c45 State Tree: Added new selection behaviors for states
- Added selection behavior None (not selectable)
- Added selection behavior TryEnterState (enters the specific state, does not consider child states)
- Added selection behavior TryFollowTransitions (follows transitions when state is tried to be selected)
- Brushed up a bit the state representation in editor (added icons, cleaned up layout)

#preflight 6436843df12d5de705595942

[CL 25005118 by mikko mononen in ue5-main branch]
2023-04-12 07:59:16 -04:00
henrik karlsson
9a1d5b1ad4 [Engine/Plugins]
* Ran IWYU on ~170 plugins to remove includes not needed. Public api still keep old includes inside #if UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_2

#preflight 63d09351574ab9cae4670216
#rb none

[CL 23844750 by henrik karlsson in ue5-main branch]
2023-01-25 02:42:36 -05:00
mikko mononen
e2fd3455a9 StateTree: Allow tasks to request transitions
- Added ability for tasks to request transitions
- Added buffered transition requests
- Added callback method to FStateTreeTaskBase which is called during transition triggering
- Allow FStateTreeStateLink to be added to tasks and conditions (resolved automatically during compile)

#jira UE-174250
#preflight 63ca7ee8977c62635603afcb

[CL 23815873 by mikko mononen in ue5-main branch]
2023-01-23 12:48:04 -05:00
mikko mononen
df359ce99e StateTree: Transition improvements
- Removed gated delay (transition will be delayed until it has been "pressed" for N seconds)
- Delay now triggers after the delay duration has passed (single trigger, not "pressed", works with events too)
- Added random variation for the delay
- Tick/Event transitions has precedence over completion transitions (that is, they are handled before completion transitions)
- Removed delay and blocking from completion transitions
- Small improvements for transitions UI

#rb Mieszko.Zielinski
#preflight 6389e0b435192facc1b95cdb

[CL 23371519 by mikko mononen in ue5-main branch]
2022-12-02 07:57:31 -05:00
zosiu
2c4ff1ccec Add IgnoreForMemberInitializationTest to FGuid properties in StateTreeState.h
#jira none
#rb mikko.mononen
#rb ben.hoffman
#preflight skip
#fyi mikko.mononen

#ushell-cherrypick of 23222487 by zsofia.balogh

[CL 23224017 by zosiu in ue5-main branch]
2022-11-21 13:05:25 -05:00
mikko mononen
a43fd72984 StateTree: Editor fixes
- Updated add button to new positive button style
- Change the add-state logic to add to root or subtrees if context is present (e.g. add after)
- Renamed UStateTreeState::LinkedState to LinkedSubtree to indicate what kind of state is expected
- Removed strong reference from the treeview (was preventing a StateTree asset being deleted)
- Fixed bad colors when renaming a state

#jira UE-151757, UE-151874, UE-163569, UE-150568
#rb Mieszko.Zielinski
#preflight 63369601f76de2d4d5977b94

[CL 22271644 by mikko mononen in ue5-main branch]
2022-09-30 11:31:57 -04:00
mikko mononen
bbd34dd782 StateTree Events
- Added StateTree events, which allows e.g. transitions based on internal or external events
- Clarified transition nomenclature
- Update UI to support transition events
- BP support for events
- Renamed UStateTreeItemBase to UStateTreeNodeBase for consistency with FStateTreeNodeBase

#jira UE-156543
#rb Mieszko.Zielinski
#preflight 631077ef660db81edbd068ca

[CL 21738918 by mikko mononen in ue5-main branch]
2022-09-01 09:06:53 -04:00
Zousar Shaker
3f4252aa56 ObjectPtr upgrade for engine plugins used from UnrealEditor -allmodules. Automated upgrade process.
#rb none
#preflight 62fe7f270601ad0504910c30

[CL 21447894 by Zousar Shaker in ue5-main branch]
2022-08-18 15:08:49 -04:00
robert manuszewski
2a0e26f5fe Fixing bad merge
#jira none
#rb trivial
#preflight none

#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 20315015 in //UE5/Release-Engine-Staging/...
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v948-20297126)

[CL 20315216 by robert manuszewski in ue5-main branch]
2022-05-22 10:30:17 -04:00
robert manuszewski
f8a812a32f Converting hardcoded short class/enum names to pathnames ahead of ANY_PACKAGE removal
#rb trivial
#jira UE-99463
#preflight 6288fd998828ea88c8aef3d0

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 20314896 via CL 20314897 via CL 20314903 via CL 20314904
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v948-20297126)

[CL 20315214 by robert manuszewski in ue5-main branch]
2022-05-22 10:30:02 -04:00
mikko mononen
a841531c2b StateTree: moved evaluators global to tree
- Deprecated per state evaluators and moved them to global to the tree
- Tick evals once per Tick()
- Updated editor node customizations to work on UStateTreeEditorData
- Added separate detail customization for UStateTreeEditorData

#jira UE-147508
#rb Yoan.StAmant
#preflight 62820e55046b81bf93911605

[CL 20221385 by mikko mononen in ue5-main branch]
2022-05-16 05:13:27 -04:00
mikko mononen
12f7e6cc86 StateTree: Fix warning about FStateTreeStateParameters::ID is not initialized properly
#jira UE-150501
#rb Mieszko.Zielinski
#preflight 626a9804464ae4f520f336a0

[CL 19960859 by mikko mononen in ue5-main branch]
2022-04-28 09:47:16 -04:00
mikko mononen
f6770cf154 StateTree: Parametrized states
- Added specific "subtree" states which can be linked to via a "linked" state
- Subtrees can only bind data back to the their root state (or tree "global" data)
- Added property bag based parameters to subtree and linked states
- Update (transient) property bag structs before resolving property paths
- Linked states reflect their parameters from the state they link to
- Added property binding to and from parameters
- Relaxed the property binding to fail if the source data is not available
- Allow enter conditions to bind to tasks, and fail the expression if trying to access unaccessible data
- Added icon for linked and subtree states
- Added source type for all binding source structs
- Added UStateTreeEditorData::VisitHierarchy to simplify iterating over all states

#jira UE-147507
#rb Yoan.StAmant
#preflight 626a47182d28b9d0f77223f5

[CL 19954567 by mikko mononen in ue5-main branch]
2022-04-28 03:54:07 -04:00
mikko mononen
e38a996c3d StateTree: Fix crash in undo
- Fix crash when undoing a move or delete
- Cleaned up the logic for move and delete

#jira UE-149306
#review
#preflight 62614403360b45c32a8b2494

[CL 19847123 by mikko mononen in ue5-main branch]
2022-04-21 08:02:21 -04:00
mikko mononen
ef8889a1c4 StateTree: Added functionality to call and reuse a subtree
- Removed unnecessary checks for specific transition (handled in enter state logic)
- Added state type to StateTreeState, State, Group, or Linked
- StateTreeState property customization hides properties based on type
- Allow a state to link to another state
- Changed baker binding validation to handle linked states
- Added linked state handling in execution context
- Updated UI deal with linked states
- Updated gameplay debugger to deal with linked states
- Moved automatic Root state adding from Editor data to editor open (tests were broken due to extra root state)
- Fixed tests and added simple test for linked state
- Added meta to tag to state link to allow to select only direct states (no next, etc)
- Added counter to track state changes (mainly for debugging)

#jira UE-147509
#review
#preflight 624beb69637925b5d306d8e7

[CL 19621621 by mikko mononen in ue5-main branch]
2022-04-05 03:20:57 -04:00
mikko mononen
1e28b99891 StateTree: Condition expressions
#jira UE-146925
#review-19478890
- Added ability to combine conditions into expressions
- Added editor UI for the expressions
- Replaced condition description with a name (makes the expressions faster to skim)
#preflight 62417309361866e20ffa6320

[CL 19524558 by mikko mononen in ue5-main branch]
2022-03-28 04:48:50 -04:00
mikko mononen
841dd874f1 StateTree: Renamed item to node
- Renamed uses of item to node
- Added base class for Conditions, Evals & Tasks

#jira UE-140363
#rb mieszko.zielinski
#preflight 61fa4083db42673a6020f1fb
#lockdown julien.marchand

#ROBOMERGE-AUTHOR: mikko.mononen
#ROBOMERGE-SOURCE: CL 18841581 in //UE5/Release-5.0/... via CL 18841871 via CL 18842048
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18842354 by mikko mononen in ue5-main branch]
2022-02-03 09:13:49 -05:00
mikko mononen
d38354a7ea StateTree: allow schema to configure editor
- allow to disable enter conditions and evaluators
- allow to configure state to have just one task

#jira UE-135723
#review-18394822
#robomerge 5.0
#preflight 61b067d35c61dba07bef0718

[CL 18403954 by mikko mononen in ue5-main branch]
2021-12-08 03:29:30 -05:00
mikko mononen
3f4f44a364 StateTree: UObject and BP support
- connect GetWorld() of FStateTreeExecutionContext explicitly to the owner
- take MassSignalSubsystem as parameter to FMassStateTreeExecutionContext directly
- separated DataViewIndex (what others see) and InstanceIndex/bInstanceIsObject (where the pointert comes from) on StateTree items
- allow item instance to be a struct or object
- added editor support for both struct or object based instance
- added Blueprint base classes for Eval, Task and Condition
- Update UStateTreeBrainComponent

#jira UE-135723
#review-18267822
#robomerge 5.0

[CL 18280804 by mikko mononen in ue5-main branch]
2021-11-24 04:26:12 -05:00
Yoan StAmant
5bef01b434 [StateTree] fixed clang compiler CIS issues caused by exported templates
#rb maxime.mercier
#fyi mikko.mononen
#jira UE-134926
#robomerge 5.0

[CL 18190932 by Yoan StAmant in ue5-main branch]
2021-11-15 10:53:25 -05:00
mikko mononen
9cb403b9ab StateTree: allow task/evaluator/condition to have separate data for isntance and item in the tree.
- Changed conditions to use the same code structure as tasks and evals
- Tasks, Evaluators, and Conditions can have separate struct for instance and tree item
- Converted existing tasks/evals/conds to use the new setup
- Updated the UI to use the new setup
- Limited the property binding to only first level properties in the instance struct
- Removed StateTreeConditionItemDetails (uses the same details customization as tasks/evals)
- Removed bunch of old test tasks and evals

#jira UE-133870
#rb Yoan.StAmant
#robomerge 5.0

[CL 18165353 by mikko mononen in ue5-main branch]
2021-11-12 05:48:11 -05:00
mikko mononen
09243f59e4 StateTree: renamed task2 and evaluator2
#jira none
#review-17882783
#robomerge 5.0

[CL 17882855 by mikko mononen in ue5-main branch]
2021-10-21 04:51:39 -04:00
mikko mononen
667a0bf417 StateTree: Remove V1
#jira none
#review-17748193
#robomerge 5.0

[CL 17882720 by mikko mononen in ue5-main branch]
2021-10-21 04:08:20 -04:00