Commit Graph

81 Commits

Author SHA1 Message Date
nat parkinson
1004be8d8a [Backout] - CL24460758 to resolve nonunity errors
[FYI] mikko.mononen
Original CL Desc
-----------------------------------------------------------------
SmartObjects: Added entry annotation selection and validation.
- Added USmartObjectSubsystem::FindEntryLocationForSlot() which allows to query entry points which are on navigable surface
- Improved debug visualizations
- Added visualization shape and size for slots
- Added gameplay interaction state tree task to query entry location

#jira UE-174418,FORT-572969
#preflight 63ff4702437ce3e7f3f60cf4

[CL 24469441 by nat parkinson in ue5-main branch]
2023-03-01 15:40:51 -05:00
mikko mononen
a24c665ba3 SmartObjects: Added entry annotation selection and validation.
- Added USmartObjectSubsystem::FindEntryLocationForSlot() which allows to query entry points which are on navigable surface
- Improved debug visualizations
- Added visualization shape and size for slots
- Added gameplay interaction state tree task to query entry location

#jira UE-174418
#preflight 63ff4702437ce3e7f3f60cf4

[CL 24462168 by mikko mononen in ue5-main branch]
2023-03-01 10:06:12 -05:00
luciano ferraro
7fae715950 Added an IsEnabled method in the SO Subsystem to check if the smart object represented by the provided handle is enabled or not
[REVIEW] [at]Mikko.Mononen
#preflight 63fdff5aae54ee4ce99e10d4

[CL 24442411 by luciano ferraro in ue5-main branch]
2023-02-28 10:24:32 -05:00
stephen holmes
81d43099e1 Refactor SharedStruct to be inline with StructView changes.
#preflight 63f489136928c1ca3d3cda80

[CL 24343339 by stephen holmes in ue5-main branch]
2023-02-21 13:03:02 -05: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
yoan stamant
750a22ea49 [SmartObject] refactored validation using IsDataValid() to report errors on asset save.
Added one slot per default for new definitions to reduce chances of creating an invalid asset.
#jira UE-174665
#rb maxime.mercier
#rb mieszko.zielinski
#preflight 63cefdecb84de45a0c023b31

[CL 23824469 by yoan stamant in ue5-main branch]
2023-01-23 18:48:38 -05:00
yoan stamant
bb96d7229f [SmartObject] fixed typo
#rb trivial
#rnx
#preflight 63cef923544e5bb075681b18

[CL 23824442 by yoan stamant in ue5-main branch]
2023-01-23 18:47:59 -05:00
henrik karlsson
9183978e29 [Engine/Plugins]
* Removed includes (using IWYU) in private files

#preflight 63c79978ac35a0e9dabbe408
#rb none

[CL 23770038 by henrik karlsson in ue5-main branch]
2023-01-19 00:48:07 -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
c1f2999501 SmartObject: Fix mutable uses of instanced structs and struct views.
#jira UE-172049
#rb Mieszko.Zielinski
#preflight 63bff27f4b018bfa80049378

[CL 23661846 by mikko mononen in ue5-main branch]
2023-01-12 09:01:21 -05:00
mieszko zielinski
dcfa2f8008 Fixed SmartObject unit tests failing if triggered via the Editor
#preflight 6391f98d5624e6da5eed076b

[CL 23448070 by mieszko zielinski in ue5-main branch]
2022-12-08 11:50:57 -05:00
mieszko zielinski
2da21261b0 Deprecated ESmartObjectUnregistrationMode and its use in SmartObjectComponent registration and unregistration and introduced two explicit paths for smart object removal:
* Unregister - keeps or deletes the runtime SO information based on SmartObjectComponent.RegistrationType
* Remove - called on SmartObject's EndPlay and ends up removing runtime data regardless of the registration type.

Also:
* SmartObjectSubsystem unfriended SmartObjectComponent - it was a toxic relationship anyway! ;)
* Made changes towards simplification of how things are done - Registering, Unregistering, Binding SO Component to a RuntimeInstance.

#preflight 6390906fbb6fefa4721822e4

[CL 23431219 by mieszko zielinski in ue5-main branch]
2022-12-07 13:05:23 -05:00
Mieszko Zielinski
9a29546f20 Temporarily commented out the overzealaus ensure in USmartObjectSubsystem::AddCollectionEntryToSimulation. The proper fix is WIP in a different stream
#jira UE-172055
#preflight 638f835a5c5308d18cedafd7
#review-23411933
#deadend

[CL 23412459 by Mieszko Zielinski in ue5-main branch]
2022-12-06 13:20:56 -05:00
mieszko zielinski
bccb817a3f SmartObject registrations changes.
- SmartObject gained knowledge whether it was registered as a part of a colleciton, or as a dynamic smart object.
- cleaned up SmartObjectComponents SOHandle setting an resetting - there's a separate function for invalidating the handle.
- added handling of SmartObjectComponent's destruction (as opposed to unregistration due to being streamed out, potentially temporarily)

#preflight 638a25c74c3ce8ae5d20ba60

[CL 23389318 by mieszko zielinski in ue5-main branch]
2022-12-05 08:19:29 -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
mieszko zielinski
bf25520ccc SmartObject collection rework, introducing a FSmartObjectContainer type that encapsulates SmartObjectComponent registration and storage. The SmartObjectSubsystem now stores a Container that aggregates all other containers supplied by loaded/streamed in SmartObjectPersistentCollection instances.
In addition:
* SmartObjectCollection got deprecated and there's a auto-update path triggered in SmartObjectCollection::PostLoad
* SmartObjectComponent component can opt out of being a part of a collection with `bCanBePartOfCollection`
* Right now we limit SmartObjects to be registered with at most a single Collection. This might change in the future if required.

Note that this is the first change in a series, we're going to support miltiple collections per level with convenient ways of assigning SmartObjects to individual collections.

#jira UE-168977
#preflight 637f8faa4004f73f627ecaca

#preflight 637fa5378b12eb83a77ad7d9

[CL 23262132 by mieszko zielinski in ue5-main branch]
2022-11-24 14:53:52 -05:00
mikko mononen
a796b2d2e4 WorldConditions: Changed FWorldConditionContextData::SetSchema to take reference instead of pointer for consistency.
#rb Mieszko.Zielinski
#preflight 637f61694004f73f62731056

[CL 23259383 by mikko mononen in ue5-main branch]
2022-11-24 10:07:17 -05:00
luciano ferraro
a9ef3c5afe Fixed issue with OwnerActor being nullptr and not usable for WorldConditions being activated as soon as the SO is added
#jira
[REVIEW] [at]Mikko.Mononen
#preflight 637e78104364ef8d1489c71c

[CL 23259346 by luciano ferraro in ue5-main branch]
2022-11-24 10:06:01 -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
mieszko zielinski
77ad40bf7d Made SmartObjectSubsystem not instantiate on Clients
[REVIEW]
#preflight 637dfcae170bc34a93e93e13

[CL 23248257 by mieszko zielinski in ue5-main branch]
2022-11-23 08:17:20 -05:00
mikko mononen
1deae510ba World condition fixes
- Fixed SmartObject test linking with World Conditions
- Corrected the handling of empty world conditions (checks or no errors)
- Added tests for empty conditions and failing activation

#jira UE-170467 FORT-540539
#preflight 637b3991fa348e84805ca372

[CL 23218783 by mikko mononen in ue5-main branch]
2022-11-21 05:17:25 -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
mieszko zielinski
528c391411 SmartObject unit testing fix.
The fix involved an extensive rework of how the testing environment is being set up, to limit loaded UWorld's influence on the results, and in turn limit how tests affect SmartObjectSubsystem instantiated for the current world.

#preflight 6368c59e63037c1026540f38

[CL 23010255 by mieszko zielinski in ue5-main branch]
2022-11-07 09:57:31 -05:00