28 Commits

Author SHA1 Message Date
yoan stamant
03daf73b7b [SmartObject] Removed dependency on MassEntity to store slots
#rb mikko.mononen

[CL 26431965 by yoan stamant in 5.3 branch]
2023-07-18 09:00:26 -04:00
yoan stamant
adf6cb0a20 [SmartObjects]
- Added new methods to the API to filter a list of request results or slot handles by evaluating the selection preconditions
- Filter methods can accept external data as a struct with properties which name and type match the WolrdConditionContext.
- FSmartObjectUserContext has been introduced to cover the common case of passing in a user actor to the context.
- Stored UserDescriptor as instanced struct in the runtime slot
- Claim methods now receive a user descriptor
- Removed slot event delegate and reuse the runtime instance one instead. Listeners can filter for a given slot using 'Event.SlotHandle'
- Removed UserTags from the SmartObjectWorldConditionSchema. The user tags are part of the query filter. Conditions requiring user tags could fetch them from the actors passed in the context.
#rb mikko.mononen
#jira UE-157763
#preflight 63dbe99f797b029c0add9806

[CL 23984054 by yoan stamant in ue5-main branch]
2023-02-02 18:43:13 -05:00
henrik karlsson
9a1d5b1ad4 [Engine/Plugins]
* 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]
2023-01-25 02:42:36 -05:00
yoan stamant
1f6c7d722f [SmartObjects]
- Removed synchronization logic between ability system component and smartobject instance tags.
- Added SmartObject subsystem to the SmartObjectWorldConditionSchema to help fixing unit tests where we use a derived subsystem. Updated existing SmartObject world conditions to use it.
- Added support for world conditions to the main smart object instance (in addition to those in each slot). Slots could be also disabled by their parent conditions.
- Removed object tags filter from the definition and replaced it by the newly added condition (FWorldCondition_SmartObjectActorTagQuery)
#rb mikko.mononen
#preflight 63c6c3530b358b97d198a121

[CL 23756420 by yoan stamant in ue5-main branch]
2023-01-18 10:52:51 -05:00
bob tellez
09e68111e3 [Backout] - CL23741166
[FYI] Yoan.StAmant
Original CL Desc
-----------------------------------------------------------------
[SmartObjects]
- Removed synchronization logic between ability system component and smartobject instance tags.
- Added SmartObject subsystem to the SmartObjectWorldConditionSchema to help fixing unit tests where we use a derived subsystem. Updated existing SmartObject world conditions to use it.
- Added support for world conditions to the main smart object instance (in addition to those in each slot). Slots could be also disabled by their parent conditions.
- Removed object tags filter from the definition and replaced it by the newly added condition (FWorldCondition_SmartObjectActorTagQuery)
#rb mikko.mononen
#preflight 63c6c3530b358b97d198a121

[CL 23752170 by bob tellez in ue5-main branch]
2023-01-18 01:06:45 -05:00
yoan stamant
853ad94e66 [SmartObjects]
- Removed synchronization logic between ability system component and smartobject instance tags.
- Added SmartObject subsystem to the SmartObjectWorldConditionSchema to help fixing unit tests where we use a derived subsystem. Updated existing SmartObject world conditions to use it.
- Added support for world conditions to the main smart object instance (in addition to those in each slot). Slots could be also disabled by their parent conditions.
- Removed object tags filter from the definition and replaced it by the newly added condition (FWorldCondition_SmartObjectActorTagQuery)
#rb mikko.mononen
#preflight 63c6c3530b358b97d198a121

[CL 23747892 by yoan stamant in ue5-main branch]
2023-01-17 18:37:13 -05:00
mikko mononen
2f2f301d65 WorldCondition: Allow query state to be bitwise relocatable, make tie to definition safer
- stored the whole condition cached state into the allocated memory to allow state to be bitwise relocated
- made definition UObject, and store reference to the definition directly into the state
- keep instantiated definitions alive (create new object)
- added query invalidation handle which is used to invalidate the query

#rb Mieszko.Zielinski
#preflight 63872b143377450900b57a46

[CL 23325777 by mikko mononen in ue5-main branch]
2022-11-30 07:17:21 -05:00
mikko mononen
37681817c0 SmartObjects: expose Smart Object owner actor for world conditions
- Store weak pointer to the owner actor when Smart Object is initialized
- Pass owner actor to world conditions
- Changed Smart Object logging to use full names where applicable

#preflight 637e0f082a05dabce9c5cd0e

[CL 23248750 by mikko mononen in ue5-main branch]
2022-11-23 09:11:13 -05:00
mikko mononen
924b989973 SmartObject: World conditions for SmartObject slot precondition
#rb Mieszko.Zielinski Luciano.Ferraro
#preflight 6375ef0b1c114bec053ccbe7
#preflight 6375fe028f4cb2e4dc8c4e4c

[CL 23174492 by mikko mononen in ue5-main branch]
2022-11-17 07:44:24 -05:00
mikko mononen
c06beb8571 SmartObject improvements
- Fixed hashing when adding shared fragment for smart object slot definition
- Added per slot Runtime Tags
- Added common event handling for Smart Object and Slot changes and events
- Added annotations, which are slot definition data that has visualization
- Added linked slot annotation which allows behavior reuse on slots
- Added editor only ID for each slot so that they can be identified during edits
- Added SmartObject slot reference type that can be used to reference other slots in the Smart Object
- Changed Smart Object bDisable to bEnabled
- Added separate enabled state for slots
- Changed Smart Object disable to send an event, not forcefully unclaim
- Added more visualization support for Smart Object editor (canvas, visualize annotations)
- Changed Smart Object editor to use the commonly transform for slots
- Remove Smart Object Component instance from the asset editor as it was not needed

#rb Stephen.Holmes
#preflight 6360f0cf63608aee36e01ba5

[CL 22888712 by mikko mononen in ue5-main branch]
2022-11-01 15:11:25 -04:00
Mieszko Zielinski
d55575b7d8 Added USmartObjectSubsystem.FindSmartObjectsWithLocations that similarly to FindSmartObjects fetched smart object slots matching given filter, but the result also contains smart object locations
Also added a handy "CanBeClaimed" function for testing individual slots.

#review-21737223
#preflight 6310808ae54ec9d581d0fade
#preflight 6310a9eae1124837759bf70f

[CL 21738872 by Mieszko Zielinski in ue5-main branch]
2022-09-01 09:03:19 -04:00
Zousar Shaker
3f4252aa56 ObjectPtr upgrade for engine plugins used from UnrealEditor -allmodules. Automated upgrade process.
#rb none
#preflight 62fe7f270601ad0504910c30

[CL 21447894 by Zousar Shaker in ue5-main branch]
2022-08-18 15:08:49 -04:00
Mieszko Zielinski
d69aa84834 Separated "entity management" and USubsystem stuff of UMassEntityManager. Now UMassEntityManager hosts a shared ref of newly created FMassEntityManager, and users are free to create their own FMassEntityManager instances to create isolated entity pools.
Updated Mass code to reflect FMassEntityManager introduction

#jira UE-147658
#review-21335324
#review-21335330
#preflight 62f6384acf7afa018b93b9b5

[CL 21353355 by Mieszko Zielinski in ue5-main branch]
2022-08-12 07:56:27 -04:00
robert manuszewski
f8a812a32f Converting hardcoded short class/enum names to pathnames ahead of ANY_PACKAGE removal
#rb trivial
#jira UE-99463
#preflight 6288fd998828ea88c8aef3d0

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 20314896 via CL 20314897 via CL 20314903 via CL 20314904
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v948-20297126)

[CL 20315214 by robert manuszewski in ue5-main branch]
2022-05-22 10:30:02 -04:00
Yoan StAmant
9363b181ee GameplayBehaviorSmartObjects plugin to create and use SmartObjects using GameplayBehaviors as their default runtime instances.
#rnx
#preflight 626feb8f264f78f46f775c92

[CL 20008771 by Yoan StAmant in ue5-main branch]
2022-05-02 10:59:07 -04:00
yoan stamant
7641c72060 [SmartObject] updated API to remove all ensure and allow caller to provide unset handle or handle to object/slots that may not longer be registered in the simulation.
#rnx
#rb mikko.mononen
#rb josselin.francois
#preflight 623385990820efd0945e69d2

#ROBOMERGE-OWNER: yoan.stamant
#ROBOMERGE-AUTHOR: yoan.stamant
#ROBOMERGE-SOURCE: CL 19425613 via CL 19431559 via CL 19435646 via CL 19436095
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v930-19419903)

[CL 19437148 by yoan stamant in ue5-main branch]
2022-03-18 12:31:49 -04:00
yoan stamant
478d81a61b [SmartObject] handles for SmartObject and SmartObjectSlot passed by value
#rnx
#rb trivial
#preflight 62322b8c6e25767a218d46b0

#ROBOMERGE-AUTHOR: yoan.stamant
#ROBOMERGE-SOURCE: CL 19410090 via CL 19412659 via CL 19426193 via CL 19426309
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v930-19419903)

[CL 19429514 by yoan stamant in ue5-main branch]
2022-03-17 19:07:54 -04:00
yoan stamant
4b56d97931 [SmartObject] added support for GameplayTags on runtime instance
+ SmartObjectComponent acts a bridge to sync tags from the RuntimeInstance and the AbilitySystemComponent (if present on the owning actor)
+ Component streamed out and back it will be bound with their persistent counterpart from the simulation and will synchronize their tags
+ RuntimeInstance and Slot now have a dedicated state when they are disabled when the instance tags don't pass the restrictions defined in the SmartObjectDefinition (ObjectTagFilter)
+ Made a pass to improve consistency in error reporting and methods descriptions
+ Added methods to validate if the object/slot associated to a FSmartObjectClaimHandle and FSmartObjectSlotHandle is still valid when those are stored and not used immediately after a call to any of the 'Find' or 'Claim' methods
#rnx
#rb mikko.mononen
#preflight 6230a0b4e65a7e65d68741e4

#ROBOMERGE-AUTHOR: yoan.stamant
#ROBOMERGE-SOURCE: CL 19386803 via CL 19389419 via CL 19398538 via CL 19398590
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19403765 by yoan stamant in ue5-main branch]
2022-03-16 03:47:02 -04:00
yoan stamant
9116dc7413 [SmartObject] access to activity tags should go through SmartObjectSlotView
+ Tags Filtering Policy now only affect TagQueries from the definitions and applied to UserTags provided by requests
+ Tags Merging Policy added for Activity Tags
#rnx
#rb josselin.francois
#preflight 621fab91257fd6e0996de3b2

#ROBOMERGE-AUTHOR: yoan.stamant
#ROBOMERGE-SOURCE: CL 19225863 via CL 19236663 via CL 19236832 via CL 19236900
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19237559 by yoan stamant in ue5-main branch]
2022-03-02 22:33:53 -05:00
yoan stamant
05a440dcfb [SmartObject] added some Tags filtering policy
+ added activityTags in slot
+ added unit test for tag filtering and fixed unit tests messages
+ preview mesh and actor class are no longer exposed to the user in the definition asset (they should only be used by the editor for preview)
+ misc API cleanup and simplifications
#rnx
#rb mikko.mononen
#preflight 621e6a9dca28c5563431e601

#ROBOMERGE-OWNER: yoan.stamant
#ROBOMERGE-AUTHOR: yoan.stamant
#ROBOMERGE-SOURCE: CL 19204358 via CL 19212259 via CL 19212264 via CL 19212779
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19224407 by yoan stamant in ue5-main branch]
2022-03-02 13:25:37 -05:00
yoan stamant
722ecdcae0 [Smart object] Space partition structure is now configurable
* Created Default SmartObjectOctree
* Created Default SmartObjectHashGrid
* Type of space partition to use can be set in the smartobject config file: [/Script/SmartObjectsModule.SmartObjectSubsystem] SpacePartitionClassName=<ClassPath>
* Created DebugSceneProxy and RenderingComponent to share functionalities between susbystem and testing actor rendering components
#rnx
#rb mieszko.zielinski
#preflight 620fb51dec6f84cdfa3b2772

#ROBOMERGE-OWNER: yoan.stamant
#ROBOMERGE-AUTHOR: yoan.stamant
#ROBOMERGE-SOURCE: CL 19050433 via CL 19050556 via CL 19050564 via CL 19057424
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v918-19018356)

[CL 19066037 by yoan stamant in ue5-main branch]
2022-02-21 01:10:34 -05:00
marc audy
6e38e5bb8b [SmartObject] added SmartObjectTestingActor
* added simple test to run a query and visualize the results
* added debug methods to force initialize/cleanup the simulation from the Editor world
* definition class is no longer mandatory (like other filtering options)
* parent object definition now accessible from SlotView
#rnx
#preflight 620c077d483ff0ae5ec4c544
#rb mieszko.zielinski, mikko.mononen

#ROBOMERGE-OWNER: marc.audy
#ROBOMERGE-AUTHOR: yoan.stamant
#ROBOMERGE-SOURCE: CL 19014188 via CL 19014236 via CL 19014251 via CL 19031906
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v917-18934589)

[CL 19032135 by marc audy in ue5-main branch]
2022-02-17 03:40:43 -05:00
yoan stamant
04214fbc78 [SmartObject] allow custom definitions (FSmartObjectSlotDefinitionData) and transient state data (FSmartObjectSlotStateData) per slot using MassEntity
+ replaced all methods Describe by LexToString
+ unified naming from "*ID" to *Handle
#preflight 61e85d121000e8c59a78c886
#rb mikko.mononen

#ROBOMERGE-AUTHOR: yoan.stamant
#ROBOMERGE-SOURCE: CL 18662203 in //UE5/Release-5.0/... via CL 18662234 via CL 18662264
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v900-18638592)

[CL 18662291 by yoan stamant in ue5-main branch]
2022-01-19 14:16:16 -05:00
yoan stamant
416fcaaf5c [SmartObject] removed bounds from runtime data
#rb trivial
#preflight 61d895e0c65e66487b38121d

#ROBOMERGE-AUTHOR: yoan.stamant
#ROBOMERGE-SOURCE: CL 18549497 in //UE5/Release-5.0/... via CL 18549525
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18549574 by yoan stamant in ue5-release-engine-test branch]
2022-01-07 14:47:39 -05:00
yoan stamant
eaf8a225d2 [SmartObject] display slot runtime state in GameplayDebugger
#rb mikko.mononen
#preflight 61a4e610d87e4a573f4ae5da

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

[CL 18310887 by yoan stamant in ue5-release-engine-test branch]
2021-11-29 11:34:31 -05:00