71 Commits

Author SHA1 Message Date
patrick boutot
92b3e3e6fa StateTree: Compile the StateTree after each load in the editor. That ensures the data is valid when cooking and that if the cpp code changed, the new properties are properly converted. Do not mark the asset as dirty when it compiles. It should only mark the asset dirty when a user does the manipulation. Any automatic conversion should be transparent for the user.
#jira UE-222447
#rb Yoan.StAmant
#p4v-cherrypick 36157962

[CL 36331606 by patrick boutot in 5.5 branch]
2024-09-17 08:06:50 -04:00
patrick boutot
98036c2050 StateTree: Delay Link after the package is loaded or when first used.
#rb Yoan.StAmant

[CL 35965260 by patrick boutot in ue5-main branch]
2024-09-03 09:15:07 -04:00
patrick boutot
b5959b59f4 StateTree: Add option to print the result of a StateTree compilation. Moved FStateTreeExecutionContext::GetDebugPrintString to UStateTree. Added transitions, global tasks and conditions. Update other FStateTreeExecutionContext functions to use StringBuilder.
#rb Yoan.StAmant

[CL 35592149 by patrick boutot in ue5-main branch]
2024-08-16 09:07:06 -04:00
patrick boutot
9af223defa StateTree: Use a thread safe delegate for internal bind to delegates that are out of StateTree controls. This is a quick fix to unblock internal projects from building. A better solution is a link/compile manager that knows the current instances or use the TObjectIterator to find the instances.
#jira UE-218319
#rb mikko.mononen

[CL 35366072 by patrick boutot in ue5-main branch]
2024-08-07 08:47:03 -04:00
jacob wang
0fa5fd8e36 [State Tree] Utility Selector Runtime First Pass
#rb mikko.mononen

[CL 34362979 by jacob wang in ue5-main branch]
2024-06-13 22:57:49 -04:00
juan portillo
cc6661e0ff State Tree: added instance data mismatch auto-fix
#jira UE-215581
#rb mikko.mononen

[CL 33836195 by juan portillo in ue5-main branch]
2024-05-22 13:29:00 -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
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
matt breindel
2a0454735e Making the asset gatherer tick run on a background thread. In order to do this, it was also necessary to refactor PostLoadAssetRegistryTags, deprecating the existing function and implementing a new ThreadedPostLoadAssetRegistryTagsOverride. The multithreading functionality is disabled in this checkin. -dpcvars=AssetRegistry.TickGatherOnGTOnly=0 will enable it.
#jira UE-204058
[REVIEW] [at]*matt.peters [at]dan.oconnor [at]ben.zeigler [at]robert.millar
[FYI] [at]francis.hurteau
#rb Matt.Peters

[CL 32388964 by matt breindel in ue5-main branch]
2024-03-20 20:13:47 -04:00
mikko mononen
a82ca89e98 StateTree: Added support for event payload in transitions and event capture for states. (contributed) [take 2]
- Transitions can now be set up to require a specific payload type and/or a gameplay tag
- Required transition event payload is visible to property bindind for transition conditions
- States can require an event type as enter condition, the event is captured when state is selected
- Required state event payload is visible to binding for state enter conditions, tasks and transistions

[CL 32150454 by mikko mononen in ue5-main branch]
2024-03-11 04:54:44 -04:00
bob tellez
0189872e84 [Backout] - CL32082262
[FYI] mikko.mononen
Original CL Desc
-----------------------------------------------------------------
StateTree: Added support for event payload in transitions and event capture for states. (contributed)
- Transitions can now be set up to require a specific payload type and/or a gameplay tag
- Required transition event payload is visible to property bindind for transition conditions
- States can require an event type as enter condition, the event is captured when state is selected
- Required state event payload is visible to binding for state enter conditions, tasks and transistions

[CL 32113027 by bob tellez in ue5-main branch]
2024-03-07 23:49:50 -05:00
mikko mononen
cec24c894d StateTree: Added support for event payload in transitions and event capture for states. (contributed)
- Transitions can now be set up to require a specific payload type and/or a gameplay tag
- Required transition event payload is visible to property bindind for transition conditions
- States can require an event type as enter condition, the event is captured when state is selected
- Required state event payload is visible to binding for state enter conditions, tasks and transistions

[CL 32082269 by mikko mononen in ue5-main branch]
2024-03-07 06:53:02 -05:00
mikko mononen
4079007ba6 StateTree: Introduced TStateTreePropertyRefExternalHandle.
- also InstanceDataStorage is stored as a sharedptr now

[CL 30996128 by mikko mononen in ue5-main branch]
2024-01-30 03:18:31 -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
mikko mononen
b80c371c77 StateTree: Added parameter overrides for StateTree states
#rb Yoan.StAmant

[CL 30589270 by mikko mononen in ue5-main branch]
2024-01-12 05:08:35 -05:00
mikko mononen
a0742e30e1 StateTree: Added option for State Tree parameters to be overridden.
- Added property override logic into FPropertyBagInstanceDataDetails
- Added hooks to allow to customize the peoperty override logic by deriving from FPropertyBagInstanceDataDetails
- Added array of overridden property IDs in FStateTreeReference

#rb Mieszko.Zielinski

[CL 30502099 by mikko mononen in ue5-main branch]
2024-01-09 07:30:16 -05:00
mikko mononen
4f24764f7f StateTree: Fixed comments and restored timing collection for Mass external data collecting
[CL 30315320 by mikko mononen in ue5-main branch]
2023-12-14 03:17:43 -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
matt peters
64658cf6ae GetAssetRegistryTags deprecation: Make the old GetAssetRegistryTags and related functions deprecated.
Upgrade the overrides and callsites in all of Epic's code.
Every class that can be subclassed by licensees that has its override change needs to keep the old version of the function as deprecated. Otherwise subclasses that call Super::GetAssetRegistryTags will have a compile error instead of a deprecation warning.
Several classes had their own extension method for GetAssetRegistryTags being passed on to user data classes. Updated all of those to take FAssetRegistryTagsContext just like GetAssetRegistryTags does.
#rnx
#rb Francis.Hurteau

[CL 30224166 by matt peters in ue5-main branch]
2023-12-08 21:45:21 -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
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