Commit Graph

116 Commits

Author SHA1 Message Date
mikko mononen
d2a74f6f7c StateTree: Fix missing include.
#rb trivial
#preflight 638dac9a976b1644cb0efe80

[CL 23388195 by mikko mononen in ue5-main branch]
2022-12-05 05:01:48 -05:00
mikko mononen
de58b75795 StateTree: Be more resilient when loading out of date BP data
- Try to convert to latest version when duplicating data
- Convert property binding source/target classes to latest version on link
- Handle BP reference replace in instanced structs

#rb Mieszko.Zielinski
#preflight 638d97e0303395f6c97629fd

[CL 23387730 by mikko mononen in ue5-main branch]
2022-12-05 03:19:45 -05:00
Stephen Holmes
2f18773caa Addressing the remaining AI numeric conversion issues.
#jira UE-166285
#review
#preflight 638a031b35192facc1c0fd77

[CL 23372606 by Stephen Holmes in ue5-main branch]
2022-12-02 10:07:29 -05:00
mikko mononen
df359ce99e StateTree: Transition improvements
- Removed gated delay (transition will be delayed until it has been "pressed" for N seconds)
- Delay now triggers after the delay duration has passed (single trigger, not "pressed", works with events too)
- Added random variation for the delay
- Tick/Event transitions has precedence over completion transitions (that is, they are handled before completion transitions)
- Removed delay and blocking from completion transitions
- Small improvements for transitions UI

#rb Mieszko.Zielinski
#preflight 6389e0b435192facc1b95cdb

[CL 23371519 by mikko mononen in ue5-main branch]
2022-12-02 07:57:31 -05:00
Victov
b7ba597b60 PR #9823: Fix a problem in StateTreeConditions where GetWorld is null (Contributed by Victov)
#rb Mikko.Mononen
#preflight 6389b69b0e4613faed0c2ee9

[CL 23370655 by Victov in ue5-main branch]
2022-12-02 05:18:07 -05:00
mikko mononen
1cc286a596 StateTree: Add indirection to FStateTreeInstanceData so that it can be bitwise relocated.
#rb Mieszko.Zielinski
#preflight 63872b0d3377450900b579a6

[CL 23325782 by mikko mononen in ue5-main branch]
2022-11-30 07:17:26 -05:00
Matt Peters
2d5975f362 IncrementalCooking - Add DeclareConstructClasses to types that need it.
#rb Zousar.Shaker
#rnx
#preflight 63811e084004f73f62dee973

[CL 23268593 by Matt Peters in ue5-main branch]
2022-11-25 15:40:13 -05:00
mikko mononen
e450d18a9f StateTree Fixes and Improvements
- Use hierarchical GamplayTag match when matchin transition event tags
- When returning succeed/failed fomr a subtree, handle it as if the linked state was completed
- Call Stop() before initializing the instance data on Start() to avoid the instance data to be overritten by Stop()
- Early out Stop() if the tree is not running
- Fixed failed transition not setting OutTransition.CurrentActiveStates correctly

#preflight 637e12ee8b12eb83a71bb694

[CL 23248889 by mikko mononen in ue5-main branch]
2022-11-23 09:22:14 -05:00
bryan sefcik
4b8a83790a Updated to use UE_INLINE_GENERATED_CPP_BY_NAME.
#jira
#preflight 637c388f170bc34a93587526

[CL 23244381 by bryan sefcik in ue5-main branch]
2022-11-22 20:17:33 -05:00
mikko mononen
2c797f2adb StateTree: Changed completion transitions to trigger at the state that was first completed.
- record the first completed state on EnterState() and TickTasks()
- returning succeeded on any node in EnterState() now behaves the same as returning succeeded on Tick()

#rb Mieszko.Zielinski
#preflight 637caf2df514e1ded9f280e4

[CL 23233890 by mikko mononen in ue5-main branch]
2022-11-22 08:13:54 -05:00
mikko mononen
ef58f44983 StateTree: Fix BP task execution
- Added explicit bShouldCallTick and not make the tick based on of the event is implemented
- This fixes the cases where we are using the BP task class to implement UObject based tasks in C++

#preflight 637c9ea3170bc34a9370bb0b

[CL 23233007 by mikko mononen in ue5-main branch]
2022-11-22 06:18:24 -05:00
mikko mononen
1c69b826cc StateTree: Added node validation during compilation
- Added a pass during compilation when node and instance data can be checked and adjusted by the node
- Changed blueprint based task to copy flags to the node in Compile()
- Changed relevant gameplay interaction tasks to check tags during Compile()

#rb Mieszko.Zielinski
#preflight 6377724cf514e1ded9a5ff44

[CL 23193668 by mikko mononen in ue5-main branch]
2022-11-18 08:38:31 -05:00
henrik karlsson
5b96352978 Fixes for c++ headerunits/modules.
* Adding forward declarations
* Adding "inline" in front of const/constexpr variables in headers
* Adding includes
* A few moves of ctor/dtor to cpp file

#preflight 6372b3ac0c74adb48b49f313
#rb none

[CL 23130896 by henrik karlsson in ue5-main branch]
2022-11-14 19:59:41 -05:00
Stephen Holmes
be96784816 More conversion warnings fixes
#jira UE-166285
#preflight 636d16603852f8738a1d4775
#review-23055159

[CL 23079248 by Stephen Holmes in ue5-main branch]
2022-11-10 10:40:09 -05:00
mikko mononen
0bc7b2da87 StateTree
- restored deprecation (was comments out due to submitting code via multiple CLs)
- cleaned up logging
- skip property binding to not take place when task is not ticked

#rb Mieszko.Zielinski
#preflight 636373961608da6ba1c3a8f2

[CL 22959061 by mikko mononen in ue5-main branch]
2022-11-03 14:21:53 -04: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
bb0b758364 StateTree: Fix AnyEnum display and binding
#jira UE-166050
#rb Mieszko.Zielinski
#preflight 633d2f411451b83c2a7558c5

[CL 22362064 by mikko mononen in ue5-main branch]
2022-10-05 15:59:33 -04:00
mikko mononen
51faf8eed8 StateTree: Fix comment on execution context SendEvent()
#rb trivial

[CL 22272720 by mikko mononen in ue5-main branch]
2022-09-30 12:21:42 -04:00
mikko mononen
5825321872 StateTree: Removed evaluator deprecations and TStateTreeInstanceDataPropertyHandle.
#jira UE-156544
#b Mieszko.Zielinski
#preflight 633549033041fbb56646450c

[CL 22260609 by mikko mononen in ue5-main branch]
2022-09-29 20:26:53 -04:00
mikko mononen
f7c48b982d StateTree: Change Task EnterState/ExitState signature
- Removed change type from EnterState/ExitState and moved it to transition result
- Added bShouldStateChangeOnReselect which allows to configure a task to behave more like state
- Updated existing tasks

#jira UE-156544
#rb Mieszko.Zielinski
#preflight 6333f6dca907d7192f5f0ccc

[CL 22221382 by mikko mononen in ue5-main branch]
2022-09-28 09:55:53 -04:00
bryan sefcik
50d4fac9e0 Updated ../Engine/Plugins/... to inline gen.cpp files
Before:
3548 unity files
Total CPU Time: 47343.578125 s
Total time in Parallel executor: 494.60 seconds

After:
3445 unity files
Total CPU Time: 46044.671875 s
Total time in Parallel executor: 468.51 seconds

#jira
#preflight 63336159b20e73a098b7f24f

[CL 22218213 by bryan sefcik in ue5-main branch]
2022-09-28 01:06:15 -04:00
luciano ferraro
230999d8ed Fixed crash when a task fails and one of its children instance data does not get updated anymore because of that, resulting in nullptr access during on completion
#jira
[REVIEW] [at]Mikko.Mononen
[FYI] Loic.Devaux, Josselin.Francois, Nicolas.Bonnelly, Phil.Cole
#preflight 6332c326e11ae0b19c033708

[CL 22206229 by luciano ferraro in ue5-main branch]
2022-09-27 10:55:54 -04:00
luciano ferraro
c95984a115 Moved AddReferencedObjects implementation out of an editor guard
#jira
#preflight skip

[CL 22173119 by luciano ferraro in ue5-main branch]
2022-09-24 13:28:43 -04:00
luciano ferraro
810eb58a1b Fix crash issue with condition instances not being reflected to GC
#jira
[REVIEW] [at]Mikko.Mononen
[FYI] Loic.Devaux, Josselin.Francois, Nicolas.Bonnelly, Phil.Cole
#preflight 632ca19310030508067245c2

[CL 22173118 by luciano ferraro in ue5-main branch]
2022-09-24 13:28:37 -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