20 Commits

Author SHA1 Message Date
mieszko zielinski
66a5a0a1f1 Removed the part of ADEPRECATED_SmartObjectCollection::PostLoad requesting the actor to be marked as garbage since the actor is being referenced by some unrelated code, and referencing garbage is undesired.
The actor should be cleaned out on save automatically since it's deprecated now. To make it clear to the end user updated the actor label to reflect its deprecation.

#preflight 6385c2e7766a2aeed2e0a549

[CL 23303069 by mieszko zielinski in ue5-main branch]
2022-11-29 05:02:39 -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
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
henrik karlsson
b5b86c796c This change is a strategical submit for a coming change that removes lots of includes in headers that are included by many files. This change contains adding of includes in files that previously got those includes transitively from other inclkudes
#preflight 6355d4940313c24974b2107b
#rb none

[CL 22783162 by henrik karlsson in ue5-main branch]
2022-10-26 12:57:32 -04:00
mieszko zielinski
cad6e9df0c Made a change to how we treat persistent-level placed SmartObjects that are not contained by the level's SmartObjectCollection
Also changed collection building to only include SOComponents in the persistent or the "always loaded" levels

#preflight 6343da651d5e6dbf75839ead

[CL 22431195 by mieszko zielinski in ue5-main branch]
2022-10-10 12:00:30 -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
yoan stamant
1d2876b4d0 [SmartObject] added editor command to clear collection
#rnx
#rb trivial

#ROBOMERGE-AUTHOR: yoan.stamant
#ROBOMERGE-SOURCE: CL 21108937 via CL 21108960 via CL 21108962
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21110307 by yoan stamant in ue5-main branch]
2022-07-15 10:50:18 -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
03990f0f3a SmartObjectCollection no longers locks its location
#rnx
#rb trivial

#ROBOMERGE-AUTHOR: yoan.stamant
#ROBOMERGE-SOURCE: CL 19379514 via CL 19381537 via CL 19394367 via CL 19394521
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19402403 by yoan stamant in ue5-main branch]
2022-03-16 03:08:01 -04:00
yoan stamant
057ffe396d [SmartObject] converted error message to log when registration fails.
Root cause is not identified yet and still under investigation but this will unblock some CIS jobs.
#rnx
#rb julien.marchand
#jira UE-143338
#preflight 6218f81e8849a7424f8a11cd
#lockdown julien.marchand

#ROBOMERGE-AUTHOR: yoan.stamant
#ROBOMERGE-SOURCE: CL 19148309 in //UE5/Release-5.0/... via CL 19148533
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19156818 by yoan stamant in ue5-main branch]
2022-02-25 16:23:40 -05:00
yoan stamant
7a006b2a96 [SmartObject]
- Maintain SmartObjectAnnotations up-to-date when dirtying collection
- Converted ensure to error log for null definition found while validating Definition from the SmartObjectCollection. Some data manipulations might create this scenario so warning the user with a proposed solution is more appropriate.
#rnx
#rb stephen.holmes
#preflight 621785d71a114ad50437ac82

#ROBOMERGE-AUTHOR: yoan.stamant
#ROBOMERGE-SOURCE: CL 19113063 via CL 19113085 via CL 19113092 via CL 19113474
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19152856 by yoan stamant in ue5-main branch]
2022-02-25 14:18:42 -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
c47fe69539 [SmartObject] minor extra logging information when registering the collection
#rb trivial
#preflight 61e70d9b7f0c4b5aad6b41a6

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

[CL 18647819 by yoan stamant in ue5-main branch]
2022-01-18 16:25:49 -05:00
yoan stamant
842eb0ffe7 [SmartObject] downgraded error to log when trying to unregister a collection that was not registered to the susbsystem.
Replaced names by full names to log messages to know the package in which the collection resides
#rb karl.dubois
#preflight 61a91885e01f3610f5345c1c

#ROBOMERGE-AUTHOR: yoan.stamant
#ROBOMERGE-SOURCE: CL 18356930 via CL 18356957 via CL 18356986 via CL 18357004 via CL 18434142 via CL 18435467
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)

[CL 18436234 by yoan stamant in ue5-release-engine-test branch]
2021-12-10 18:31:54 -05:00
yoan stamant
73f02f5af9 [SmartObjects] integration of (18039396, 18230600, 18263205, 18300133, 18301080) from UE5
#ROBOMERGE-OWNER: yoan.stamant
#ROBOMERGE-AUTHOR: yoan.stamant
#ROBOMERGE-SOURCE: CL 18301426 via CL 18301593 via CL 18301595 via CL 18301822 via CL 18301845
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18301862 by yoan stamant in ue5-release-engine-test branch]
2021-11-26 15:48:13 -05:00
yoan stamant
7333e43c3a [SmartObjectColllection] change config lookup key type to UObject instead of AActor so components used by unit test can also work
#preflight 61957f254f57fbea79025b08
#rb maxime.mercier

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

[CL 18230617 by yoan stamant in ue5-release-engine-test branch]
2021-11-17 17:55:01 -05:00
yoan stamant
1cbe440fe2 [SmartObjects]
* Collection entry holds the Transform, Bounds and Index to the shared configuration. This removes the dependency on components being loaded to create runtime data for partitioned worlds.
* Removed commented references to SparseClassData since that approach won't be used (actor component not supported)
* Runtime data now points to a shared configuration from the collection instead of holding a copy
* Subsystem tracks components registered at runtime so the collection can be updated accordingly since those entries won't persist outside of loading range
* Moved most initialization code for the subsystem to the OnWorldComponentsUpdated callback since active level collection is set and actors from the persistent level registered.

[WorldPartitionBuilder]
* Added OnPartitionBuildStarted/OnPartitionBuildCompleted virtual methods
* New UWorldPartitionSmartObjectCollectionBuilder to build SmartObjectCollection in partitioned worlds

#preflight 61814a46fc786a0001447995
#jira UE-105113
#rb maxime.mercier

#ROBOMERGE-AUTHOR: yoan.stamant
#ROBOMERGE-COMMAND: FnMain
#ROBOMERGE-SOURCE: CL 18019580 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v885-17909292)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0
#ROBOMERGE[bot1]: Main

[CL 18019655 by yoan stamant in ue5-release-engine-test branch]
2021-11-02 11:12:43 -04:00
mieszko zielinski
31a5065342 Moved GameplayBehaviors out of restricted folder over to Experimental
Moved SmartObjects out of restricted folder
Moved StateTree out of restricted folder
Moved ZoneGraph out of restricted folder
Moved ZoneGraphAnnotations out of restricted folder

#jira UE-115297

#ROBOMERGE-OWNER: mieszko.zielinski
#ROBOMERGE-AUTHOR: mieszko.zielinski
#ROBOMERGE-SOURCE: CL 17648223 via CL 17648246 via CL 17648261 via CL 17648385 via CL 17648390
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v875-17642767)
#ROBOMERGE-CONFLICT from-shelf
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17648742 by mieszko zielinski in ue5-release-engine-test branch]
2021-09-28 13:33:00 -04:00