Commit Graph

23 Commits

Author SHA1 Message Date
Yoan StAmant
af7394cf27 [StateTree] replaced StateTreeParameters by InstancedPropertyBag
#rnx
#rb mikko.mononen
#preflight 6273ec0f03269096abc99574

[CL 20059078 by Yoan StAmant in ue5-main branch]
2022-05-05 12:02:47 -04:00
mikko mononen
90b9339cda StateTree fixes
- Fixed unset index check in UStateTree::Link() and FStateTreeExecutionContext
- Changed FStateTreeExecutionContext to call ExitState() from leaf-to-root
- Fixed handling of empty sources in FStateTreePropertyBindings::CopyTo()

#jira none
#review
#preflight 6273c1005b05fb4f601353b4

[CL 20056497 by mikko mononen in ue5-main branch]
2022-05-05 08:44:57 -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
bob tellez
637948f95a #StateTree Make GetActiveStateName(s) available when WITH_STATETREE_DEBUG is 0
[FYI] mikko.mononen

#ROBOMERGE-AUTHOR: bob.tellez
#ROBOMERGE-SOURCE: CL 19952052 via CL 19952055
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 19953111 by bob tellez in ue5-main branch]
2022-04-28 02:19:09 -04:00
mikko mononen
44d3945983 StateTree: fix PVS warnings
- The 'TargetProperty' pointer was utilized before it was verified against nullpt
- The modification of the 'TreeDescIndex' variable is unsequenced relative to another operation on the same variable. This may lead to undefined behavior.

#jira UE-148951 UE-149238
#rb Mieszko.Zielinski
#preflight 625feaafdd47b4ad2167447e

[CL 19827521 by mikko mononen in ue5-main branch]
2022-04-20 07:19:18 -04:00
Yoan StAmant
c135ebcd95 [StateTree]
+ Added StateTree parameters usable for data bindings and that could be overriden on context initialization by a StateTreeReference
+ Added StateTreeReference struct to hold a reference to a StateTree asset along with a list of values to parameterized the tree.
+ Added named external data items that are defined bt the Schema and for which values must be provided at runtime through the execution context.
+ Added delegate OnPostCompile after successful compilation. The StateTreeReference listens to it to validate its parameters
+ EditorData now contains its own version of the schema and parameters. On successful compilation they are copied over the StateTree own properties.
#rnx
#rb mikko.mononen
#preflight 6255d281647ad886b3593cb0

[CL 19727363 by Yoan StAmant in ue5-main branch]
2022-04-12 15:55:39 -04:00
mikko mononen
b156e83342 StateTree: Renamed baker to compiler
#jira none
#rb Yoan.StAmant
#preflight 624c465da64871f1a10a2ee6

[CL 19624175 by mikko mononen in ue5-main branch]
2022-04-05 09:44:28 -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
Yoan StAmant
55e9970a99 [StateTree] misc trivial changes
- removed dependencies on someplugins (GameplayBehaviors, GameplayAbilities and SmartObjects)
#rnx
#rb none
#preflight 624b28c03a5a4c1622fb45ca

[CL 19612244 by Yoan StAmant in ue5-main branch]
2022-04-04 13:53:17 -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
49de6cb549 StateTree: Fix for instance data when compiling BP classes
- Moved instance object directly on FStateTreeInstanceData to make easier to access
- Internal instance data on FStateTreeExecutionContext is not property to simplify handling
- Link & resolve properties on UStateTree when objects are replaced (to refresh cached property pointers)
- Moved instance data initialization out from FStateTreeExecutionContext
#preflight 623b0bff10251d53d5823f3e

[CL 19477789 by mikko mononen in ue5-main branch]
2022-03-23 08:06:00 -04:00
mikko mononen
95cec28098 StateTree: Moved instance data out from framents
- Added new struct to hold instance data
- Removed on the fly created customs struct for storing the instance data
- The Mass StateTree instance data is not a fragment anymore
- Fixes crash when using StateTreeBrainComponent directly on actor
- Moved StateTree activation processor settings to Mass Behavior settings

#jira UE-133870
#rb Yoan.StAmant
#preflight 62178318db60b6b592190db8

[CL 19112506 by mikko mononen in ue5-main branch]
2022-02-24 08:19:23 -05:00
mikko mononen
dc6bc47087 StateTree improvements:
- EnterState() stops on failure, ExitState() handled symmetrically up to the last failed task
- Allow to run evaluators when reselecting a state after failed EnterState()

#jira none
#review-18351414
#robomerge 5.0
#preflight 61b1d3e2274068529fddcafe

[CL 18417260 by mikko mononen in ue5-main branch]
2021-12-09 05:26:00 -05:00
jon nabozny
0d5fc99c2a Prevent MassAI and StateTree from crashing when invalid StateTree assets are used.
Added a check to make usre StateTrees have valid instances, and prevented adding Mass Behavior subsystems when an ExecutionContext fails to initialize.

[FYI] [at]Julien.Marchand, [at]Mikko.Mononen
#jira UE-134972, UE-134977

#ROBOMERGE-AUTHOR: jon.nabozny
#ROBOMERGE-SOURCE: CL 18192097 via CL 18372150 via CL 18372271
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18372327 by jon nabozny in ue5-release-engine-test branch]
2021-12-03 15:35:57 -05:00
mikko mononen
11ea4b3fa0 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

#ROBOMERGE-AUTHOR: mikko.mononen
#ROBOMERGE-SOURCE: CL 18280804 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v895-18170469)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 18280809 by mikko mononen in ue5-release-engine-test branch]
2021-11-24 04:26:29 -05:00
mikko mononen
4f7ae55361 StateTree: handle transitions after ticking tasks and evaluators
- changed at which stage transitions are handled
- updated the binding visibility of tasks and evaluators (transition conditions can see task data now)

#jira none
[REVIEW]
#preflight 619217e6e96ba28321d9e72e

#ROBOMERGE-AUTHOR: mikko.mononen
#ROBOMERGE-SOURCE: CL 18183493 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v895-18170469)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 18183500 by mikko mononen in ue5-release-engine-test branch]
2021-11-15 03:46:57 -05:00
mikko mononen
24de01248c 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-AUTHOR: mikko.mononen
#ROBOMERGE-SOURCE: CL 18165353 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v889-18060218)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 18165377 by mikko mononen in ue5-release-engine-test branch]
2021-11-12 05:49:31 -05:00
yoan stamant
7aefe60674 Misc type conversion warning trivial fixes
#rb maxime.mercier
#preflight 618aa174cd591b516590f10c

#ROBOMERGE-AUTHOR: yoan.stamant
#ROBOMERGE-SOURCE: CL 18107621 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v889-18060218)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 18107630 by yoan stamant in ue5-release-engine-test branch]
2021-11-09 12:24:26 -05:00
mikko mononen
8bb7c1edaf StateTree: calculate external item indices correctly
#jira none

#ROBOMERGE-AUTHOR: mikko.mononen
#ROBOMERGE-SOURCE: CL 18031381 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 18031432 by mikko mononen in ue5-release-engine-test branch]
2021-11-03 07:03:18 -04:00
mikko mononen
ef7ea7b60d StateTree: Resolve external dependecies at load time instead of bake time
- added StateTree linker
- added Link() method to tasks and evaluators
- added templated item reference which makes getter code less error prone

#jira none

#ROBOMERGE-AUTHOR: mikko.mononen
#ROBOMERGE-SOURCE: CL 17941680 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 17941733 by mikko mononen in ue5-release-engine-test branch]
2021-10-27 06:11:44 -04:00
mikko mononen
90be56c143 StateTree: renamed task2 and evaluator2
#jira none

#ROBOMERGE-AUTHOR: mikko.mononen
#ROBOMERGE-SOURCE: CL 17882855 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v883-17842818)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 17882858 by mikko mononen in ue5-release-engine-test branch]
2021-10-21 04:53:16 -04:00
mikko mononen
6f3f4d3d0b StateTree: Remove V1
#jira none

#ROBOMERGE-AUTHOR: mikko.mononen
#ROBOMERGE-SOURCE: CL 17882720 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v883-17842818)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 17882731 by mikko mononen in ue5-release-engine-test branch]
2021-10-21 04:12:07 -04:00
mieszko zielinski
31a5065342 Moved GameplayBehaviors out of restricted folder over to Experimental
Moved SmartObjects out of restricted folder
Moved StateTree out of restricted folder
Moved ZoneGraph out of restricted folder
Moved ZoneGraphAnnotations out of restricted folder

#jira UE-115297

#ROBOMERGE-OWNER: mieszko.zielinski
#ROBOMERGE-AUTHOR: mieszko.zielinski
#ROBOMERGE-SOURCE: CL 17648223 via CL 17648246 via CL 17648261 via CL 17648385 via CL 17648390
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v875-17642767)
#ROBOMERGE-CONFLICT from-shelf
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17648742 by mieszko zielinski in ue5-release-engine-test branch]
2021-09-28 13:33:00 -04:00