- When duplicating the Component, RandomStream was always copied from the one on Component CDO and wasn't constructed with the current time as expected. We now initialize RandomStream at FStateTreeExecutionContext::Start(), where the InstanceData is going to persist till Stop().
- Moved RandomStream variable to FStateTreeExecutionState as it better reflects the window it persists now.
- Fixed non-deterministic default-constructed value of RandomStream variable in UStruct LogError by the above
#jira UE-212551
#rb mikko.mononen
[CL 33174826 by jacob wang in ue5-main branch]
- Added a new option for selecint child at uniform random in StateTreeStateSelectionBehavior
- Added RandomStream in StateTreeInstanceData and relevant APIs to get stream and set seed
#rb mikko.mononen
[CL 33006455 by jacob wang in ue5-main branch]
- Added support for shared event buffer, so that multiple instance data can use the same
- Added API to consume events
- Removed double buffering from events
- Treat TriggerTransitions() as event handler (events flushed after each call to the method)
- Event handlers (including tasks) are executed in priority order
- Transitions and event capturing states can consume events on successful selection
- Added API to tick a StateTree in two passes (update tasks and trigger transitions)
- Change parallel tree tasks to do the task update in Tick(), and event handling in TriggerTransitions()
- Small improvements to the ST debugger to display events
- NOTE: this is breaking change for implementations that has relied events emitted during tick to be available on next EnterState()
#okfirgithub public
#rb Yoan.StAmant
[CL 32924765 by mikko mononen in ue5-main branch]
- 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]
- 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]
- 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]
[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]
- 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]
Also removed the Mutable named functions and replaced with the constness being part of the template.
#preflight 63ea4fbaec50523134d85665
[CL 24197313 by stephen holmes in ue5-main branch]
* 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]
- 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]
- 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]
- 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]
- 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]