Commit Graph

26 Commits

Author SHA1 Message Date
patrick boutot
b29fa29a65 StateTree: Add accessor to get the list of active states.
#jira UE-166098
#rb Mieszko.Zielinski, Yoan.StAmant

[CL 35742179 by patrick boutot in ue5-main branch]
2024-08-22 11:29:18 -04:00
foobit
3fb9d52894 PR #11971: Fixed issue in StateTreeAIComponent not starting automatically when attached to an AIController
Introduced with CL 21673181. It looks like the logic was inverted. The context requirement functionality got refactored after the original modification and it will not put the component in a wrong situation if it gets attached later to a valid owner.
#jira UE-216567
#rb Yoan.StAmant

[CL 35560020 by foobit in ue5-main branch]
2024-08-15 07:56:28 -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
guillaume arruda
a3f5944e10 Create IStateTreeSchemaProvider that allows a derived class to override the schema used by a parent property.
Create StateTreeAIComponent & StateTreeAIComponentSchema derived from StateTreeComponent but guaranteed to have a AIController
#rb mikko.mononen

[CL 31940750 by guillaume arruda in ue5-main branch]
2024-03-01 07:42:54 -05:00
guillaume arruda
614bacdf88 Create BTTask_RunStateTree and BTTask_RunDynamicStateTree that allows the execution of state tree in a behavior tree
#rb mikko.mononen

[CL 31870609 by guillaume arruda in ue5-main branch]
2024-02-28 09:45:27 -05:00
BinaerBoy
a95cc37d3c [StateTree]
PR #11008: Fix nullptr error for invalid StateTreeRef
#jira UE-198647
#rb Mieszko.Zielinski

[CL 31613815 by BinaerBoy in ue5-main branch]
2024-02-19 11:51:26 -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
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
yoan stamant
506e82ba24 [StateTree] stop logic on EndPlay for auto-activated components (start logic) that are not associated to an AI owner.
#rnx
#rb mikko.mononen, mieszko.zielinksi
#preflight 641454f05d3e25354f15d9ae

[CL 24687982 by yoan stamant in ue5-main branch]
2023-03-17 09:41:07 -04:00
mikko mononen
4e9c130c92 StateTree: Set parameters when calling Tick() and Stop()
- Fixed bug where parameter data was not set on tick or stop

#preflight 63dcf7e11466610c6422f6b1

[CL 23989377 by mikko mononen in ue5-main branch]
2023-02-03 08:41:48 -05:00
henrik karlsson
bbc37aa2f5 [Engine/Plugins]
* Another batch iwyu updates to reduce number of includes used in files

#preflight 63c58d742e714f64ade93797
#rb none

[CL 23732856 by henrik karlsson in ue5-main branch]
2023-01-16 17:04:48 -05:00
mikko mononen
57a0d8a492 StateTree: More graceful handling of GetStateTreeRunStatus()
- Calling GetStateTreeRunStatus() on unintialized instance is not error anymore, returns failed
- Made UStateTreeComponent::GetStateTreeRunStatus() to return failed instead of unset to be consistent with FStateTreeExecutionContext
- Allow to access execution state directly from instance data without exec context
- Do no crete exec context in UStateTreeComponent when sending events

#jira UE-173207
#preflight 63bfec4af02e72c08cab1811

[CL 23661828 by mikko mononen in ue5-main branch]
2023-01-12 09:00:45 -05:00
foobit
7c8f7ac6fe PR #9830: [StateTree] StateTreeComponent.GetStateTreeRunStatus method and status delegate (Contributed by foobit)
#rb Mikko.Mononen
#preflight 639c374143330e63e5bb8fd0

[CL 23536754 by foobit in ue5-main branch]
2022-12-16 05:45:13 -05:00
foobit
02157eb343 PR #9880: [StateTree] Fix crash in UStateTreeComponent (Contributed by foobit)
#rb Mikko.Mononen
#preflight 639b24d635203bc7aa58cd48

[CL 23531396 by foobit in ue5-main branch]
2022-12-15 15:56:52 -05:00
Duroxxigar
9c814d5e8d PR #9910: Create Setter for auto start property for state tree (Contributed by Duroxxigar)
#rb Mikko.Mononen
#preflight 639af82535203bc7aa4c030a

[CL 23531355 by Duroxxigar in ue5-main branch]
2022-12-15 15:55:44 -05:00
mikko mononen
186e03b32e StateTree: Improved event handling
- Moved event queue to it's own struct
- Changed the SendEvent() API to accept struct view to prevent instanced struct copy in common cases
- Fixed event handling in case EnterState() fails.
- Added option for Tasks to disavble ticking, or to be ticked only when there are events
- Added option for Tasks handle when properties are copied
- Changed DebugText to use external Actor reference
- Changed DelayTask to use the new GetInstanceData which does not need type
- Added TStateTreeInstanceDataStructRef which can be used to access struct instance data in delegates

#rb Maxime.Mercier Luciano.Ferraro
#preflight 6360dd302b5338aceb2d0343

[CL 22888708 by mikko mononen in ue5-main branch]
2022-11-01 15:11:19 -04:00
mikko mononen
b24ef66a2f StateTree: Removed internal instance from StateTree execution context.
#rb Mieszko.Zielinski
#preflight 632d72ca1003050806b168c2

[CL 22163646 by mikko mononen in ue5-main branch]
2022-09-23 20:02:42 -04:00
mikko mononen
0d47d49765 StateTree: Context Objects
- Cleaned up Blueprint nodes from deprecated functions
- Added call guards for BP implemented events on BP nodes
- Renamed Named External Data to Context (Object/Data)
- Added automatic binding for Context objects
- Added UI visualization for Context properties and cleaned up the Input/Ouput visualization
- Added compiler errors for missing Input and Context properties

#jira UE-156544 UE-147509
#rb Stephen.Holmes

[CL 22084585 by mikko mononen in ue5-main branch]
2022-09-19 19:47:11 -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
mikko mononen
0d1ace8323 StateTree: StateTreeComponent improvements
- Added option to start the StateTree automatically on BeginPlay
- StateTreeComponentSchema: allow to specify which actor class to expect the StateTree to run on (allows to bind to Actor specific data directly)
- Fixed FStateTreeReference parameter update on BP instance (the struct gets copied, which cause issues with the delegate handle)

#rb Mieszko.Zielinski
#preflight 630c70bb0345de4ccf7c8b51

[CL 21685020 by mikko mononen in ue5-main branch]
2022-08-29 14:47:43 -04:00
mikko mononen
2a196bac7c StateTree:
- Changed existing conditions to use the simpler instance data getter
- Added UObject based conditions
- Renamed condition file for consistency

#rb Mieszko.Zielinski
#preflight 6304879ca45b007ea268d917

[CL 21512046 by mikko mononen in ue5-main branch]
2022-08-23 13:04:52 -04:00
Zousar Shaker
da1254fd35 Callsite upgrade pass for TObjectPtr use on plugins used when building UnrealEditor with "-allmodules".
#rb none
#preflight 62daee42ac71f3a225b744f9

[CL 21226921 by Zousar Shaker in ue5-main branch]
2022-07-22 15:06:06 -04:00
mikko mononen
68a3b6aa67 StateTree: Made StateTreeComponent to use StateTreeRef, and fixed StateTreeRef on Actor Components
#preflight 62da4a10185da2495f802bae

#ROBOMERGE-AUTHOR: mikko.mononen
#ROBOMERGE-SOURCE: CL 21217415 via CL 21217580 via CL 21217683
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21218420 by mikko mononen in ue5-main branch]
2022-07-22 05:33:11 -04:00
charles lefebvre
f330003d83 Fix non unity build errors
#test compile cpp

#ROBOMERGE-AUTHOR: charles.lefebvre
#ROBOMERGE-SOURCE: CL 20983054 via CL 20983059 via CL 20983073
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 20984641 by charles lefebvre in ue5-main branch]
2022-07-07 11:38:21 -04:00
charles lefebvre
6d45b2b8a1 Fix non unity build errors
#test compile cpp

#ROBOMERGE-AUTHOR: charles.lefebvre
#ROBOMERGE-SOURCE: CL 20982859 via CL 20982867 via CL 20982871
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 20984620 by charles lefebvre in ue5-main branch]
2022-07-07 11:37:15 -04:00