97 Commits

Author SHA1 Message Date
mikko mononen
44c58a9a25 StateTree: Manually merged 31902376, 32435826, 32969383, and 33135570 from Main.
Merging important crash fixes which happened past 5.4 deadlines but severely affect the new features in 5.4.
The fixes were made on top of functionality that is not yet in 5.4. so had to be merged manually.

#jira UE-211189
#rb Mieszko.Zielinski

[CL 33463624 by mikko mononen in 5.4 branch]
2024-05-06 14:19:15 -04:00
mikko mononen
348099ee47 StateTree: Fix active instance data access when during selection.
#rb Mieszko.Zielinski
#lockdown julien.marchand

[CL 32544383 by mikko mononen in 5.4 branch]
2024-03-27 11:10:54 -04:00
mikko mononen
9977e88469 StateTree: Fixed non initialized state params when checking it's enter conditions
[CL 32510432 by mikko mononen in 5.4 branch]
2024-03-26 11:32:39 -04:00
mikko mononen
f1104edd5f StateTree: Introduced TStateTreePropertyRefExternalHandle.
- also InstanceDataStorage is stored as a sharedptr now

[CL 31000297 by mikko mononen in 5.4 branch]
2024-01-30 06:46:14 -05:00
mikko mononen
dd16540a54 StateTree: Storing global parameters data in instance storage.
- Implies that parameters are only set once at start
- Allows parameters to be safely mutated if needed, e.g. via property references

[CL 30765232 by mikko mononen in ue5-main branch]
2024-01-22 05:38:03 -05:00
yoan stamant
8033d0dd79 [StateTreeDebugger] added trace event for conditions forced to a given result, either from an internal failure to access source data or from the evaluation mode set.
#jira UE-200473
#rb mikko.mononen

[CL 30480397 by yoan stamant in ue5-main branch]
2024-01-08 09:52:36 -05:00
yoan stamant
58e697959b [StateTreeDebugger] added trace event to make it more obvious that global task completion completes the tree
#jira UE-202523
#rb mikko.mononen

[CL 30480155 by yoan stamant in ue5-main branch]
2024-01-08 09:33:45 -05:00
yoan stamant
291f8bc9e0 [StateTreeDebugger] support for linked tree assets
- added new dedicated section for completed states
#rb mikko.mononen

[CL 30293000 by yoan stamant in ue5-main branch]
2023-12-13 10:21:13 -05:00
mikko mononen
6f402b9027 StateTree: Added support for external data for nested tree.
#rb Mieszko.Zielinski

[CL 30289195 by mikko mononen in ue5-main branch]
2023-12-13 06:34:27 -05:00
mikko mononen
400112a177 StateTree: Enabled parameters for all state types
- Allow each state to have parameters (not super useful yet)
- Made property bindings for parameters to retain binding when a param is renamed (keeps track of the property bag ID)
- Fixed access of temporary instance data with EStateTreeDataSourceType::StateParameterData
- Added comments for UStateTreeState properties
- Changed property order of UStateTreeState so that display data comes first, then state settings, and finally parameters
- Fixed FStateTreeStateParametersInstanceDataDetails to allow property editing and value binding at the same time

#rb Mieszko.Zielinski

[CL 30112368 by mikko mononen in ue5-main branch]
2023-12-05 06:59:39 -05:00
mikko mononen
9106379fa3 StateTree: Fix crash trying to access invalid instance data
- During state selection keep track if the current state we're expanding is part of the active states, if not prevent access to instance data

#jira UE-201217
#rb Mieszko.Zielinski

[CL 30036182 by mikko mononen in ue5-main branch]
2023-12-01 06:43:27 -05:00
mikko mononen
16962d6a2f StateTree: Added Linked Asset state type, which allows to link another asset as subtree.
- Added LinkedAsset State Tree State Type
- Allow to pick nested tree asset on LinkedAsset states
- Changed how linked state params are accessed using ParentFrame
- Added temporary instance data
- Temporaries are kept around until state selection
- Create temp instance data during state selection for state parameters (allows to create enter conditions based on subtree state params)
- Instantiate and Start linked State Trees global tasks and evaluators during state selection
- Matching temporary instances created during state selection are moved to instance data on state change (rest are discarded)
- Per node instance data is looked up just once, and FStateTreeExecutionContext::GetInstanceData() only serves the specific instance data.

#rb Mieszko.Zielinski, Yoan.StAmant

[CL 30012308 by mikko mononen in ue5-main branch]
2023-11-30 07:03:20 -05:00
mikko mononen
514c109ea2 StateTree: Fixed crash caused by GetDataView() with SharedInstanceDataObject returning the wrapper struct and not the actual object.
[CL 29916888 by mikko mononen in ue5-main branch]
2023-11-24 04:04:27 -05:00
mikko mononen
19a1c42998 StateTree: remove redundand check for running state when stopping the StateTree.
[CL 29916525 by mikko mononen in ue5-main branch]
2023-11-24 02:48:28 -05:00
mikko mononen
a500b14b6a StateTree: Changed how instance data is accessed
- Remove DataView concept
- Added FStateTreeExecutionFrame, which defines an active branch of a specific state tree that is running
- Added FStateTreeDataHandle, which allows frame relative access of instance data (replaces the DataViews)
- Changed linked states to spawn new frames (will later extend to handle linked trees on other assets)
- Bumped StateTree data version number, requires recomplation of StateTrees

#rb Yoan.StAmant

[CL 29884503 by mikko mononen in ue5-main branch]
2023-11-22 04:08:33 -05:00
grant medine
74338326da [Backout] - CL29805076
[FYI] mikko.mononen
Original CL Desc
-----------------------------------------------------------------
StateTree: Changed how instance data is accessed
- Remove DataView concept
- Added FStateTreeExecutionFrame, which defines an active branch of a specific state tree that is running
- Added FStateTreeDataHandle, which allows frame relative access of instance data (replaces the DataViews)
- Changed linked states to spawn new frames (will later extend to handle linked trees on other assets)
- Bumped StateTree data version number, requires recomplation of StateTrees

#rb Yoan.StAmant

[CL 29810071 by grant medine in ue5-main branch]
2023-11-17 11:42:17 -05:00
mikko mononen
72c488d0cf StateTree: Changed how instance data is accessed
- Remove DataView concept
- Added FStateTreeExecutionFrame, which defines an active branch of a specific state tree that is running
- Added FStateTreeDataHandle, which allows frame relative access of instance data (replaces the DataViews)
- Changed linked states to spawn new frames (will later extend to handle linked trees on other assets)
- Bumped StateTree data version number, requires recomplation of StateTrees

#rb Yoan.StAmant

[CL 29805087 by mikko mononen in ue5-main branch]
2023-11-17 07:41:08 -05:00
mikko mononen
44d7dc29e1 StateTrees: Made StateTreeLinker handle IInterface types
[CL 29553306 by mikko mononen in ue5-main branch]
2023-11-08 02:43:58 -05:00
juan portillo
09c6561997 [StateTree]
Added "Next Selectable State" transition option which is similar to "Next State" but the difference is that if the next state fails to be selected (i.e. enter condition failed), then instead of going back up the hierarchy, it will try to select the next sibling until it finds one that is selectable or if it reached the end of the sibling list.

#rb Mikko.Mononen
#jira UE-198276

[CL 28852004 by juan portillo in ue5-main branch]
2023-10-17 16:15:53 -04:00
yoan stamant
4124dceb00 [StateTreeDebugger] Fixed condition trace events.
Now sent before reseting the bindings
#jira UE-196687
#rb mikko.mononen

[CL 28494509 by yoan stamant in ue5-main branch]
2023-10-05 08:21:08 -04:00
yoan stamant
1e3df2603b [StateTree] Added deferred stop and validation for reentrant calls to Start/Stop/Tick.
#rb mikko.mononen

[CL 28133788 by yoan stamant in ue5-main branch]
2023-09-22 09:53:34 -04:00
yoan stamant
1e2e1923ec [StateTreeDebugger] added trace when transition tasks get evaluated
[CL 27601475 by yoan stamant in ue5-main branch]
2023-09-05 13:01:06 -04:00
yoan stamant
5339b57aaa [StateTree]
Updated compiler to ignore disabled states when getting next sibling states.
Fixed transition to enabled states inside a disabled parent state.
#rnx
#rb mikko.mononen

[CL 27112355 by yoan stamant in ue5-main branch]
2023-08-15 14:21:54 -04:00
yoan stamant
6e26cbb348 [StateTreeDebugger] add traces for Evaluators
#rnx
#rb maxime.mercier

[CL 26901368 by yoan stamant in ue5-main branch]
2023-08-07 18:06:40 -04:00
yoan stamant
8aba578f59 [StateTreeDebuggger] Frame details view update:
- replaced node details view by embedding property values in the tree view
- node exported text (e.g. Task, Conditions, etc) is no longer imported in struct or object to avoid problems with missing types or property types with specific requirements (e.g. Object base property needs to find the specified value). Goal is to always be able to inspect key/value pairs.
- improved hierarchy of event to improve readibility
- started adding some custom row widgets for the different event types
- reworked the toolbar to regroup the different concepts (Simulation controls, Trace recording, Trace analyzing)
#rnx
#rb mikko.mononen

[CL 26855639 by yoan stamant in ue5-main branch]
2023-08-04 14:55:23 -04:00