- Remove game feature data from asset manager when unregistering.
- When an asset is removed from the asset registry, also remove it from the asset manager.
-review-20397299
#p4v-preflight-copy 20385644
#ROBOMERGE-OWNER: justin.marcus
#ROBOMERGE-AUTHOR: justin.marcus
#ROBOMERGE-SOURCE: CL 20441121 via CL 20441132 via CL 20441313 via CL 20441314
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)
[CL 20449474 by justin marcus in ue5-main branch]
This change consists of multiple changes:
Core:
- Deprecation of ANY_PACKAGE macro. Added ANY_PACKAGE_DEPRECATED macro which can still be used for backwards compatibility purposes (only used in CoreUObject)
- Deprecation of StaticFindObjectFast* functions that take bAnyPackage parameter
- Added UStruct::GetStructPathName function that returns FTopLevelAssetPath representing the path name (package + object FName, super quick compared to UObject::GetPathName) + wrapper UClass::GetClassPathName to make it look better when used with UClasses
- Added (Static)FindFirstObject* functions that find a first object given its Name (no Outer). These functions are used in places I consider valid to do global UObject (UClass) lookups like parsing command line parameters / checking for unique object names
- Added static UClass::TryFindType function which serves a similar purpose as FindFirstObject however it's going to throw a warning (with a callstack / maybe ensure in the future?) if short class name is provided. This function is used in places that used to use short class names but now should have been converted to use path names to catch any potential regressions and or edge cases I missed.
- Added static UClass::TryConvertShortNameToPathName utility function
- Added static UClass::TryFixShortClassNameExportPath utility function
- Object text export paths will now also include class path (Texture2D'/Game/Textures/Grass.Grass' -> /Script/Engine.Texture2D'/Game/Textures/Grass.Grass')
- All places that manually generated object export paths for objects will now use FObjectPropertyBase::GetExportPath
- Added a new startup test that checks for short type names in UClass/FProperty MetaData values
AssetRegistry:
- Deprecated any member variables (FAssetData / FARFilter) or functions that use FNames to represent class names and replaced them with FTopLevelAssetPath
- Added new member variables and new function overloads that use FTopLevelAssetPath to represent class names
- This also applies to a few other modules' APIs to match AssetRegistry changes
Everything else:
- Updated code that used ANY_PACKAGE (depending on the use case) to use FindObject(nullptr, PathToObject), UClass::TryFindType (used when path name is expected, warns if it's a short name) or FindFirstObject (usually for finding types based on user input but there's been a few legitimate use cases not related to user input)
- Updated code that used AssetRegistry API to use FTopLevelAssetPaths and USomeClass::StaticClass()->GetClassPathName() instead of GetFName()
- Updated meta data and hardcoded FindObject(ANY_PACKAGE, "EEnumNameOrClassName") calls to use path names
#jira UE-99463
#rb many.people
[FYI] Marcus.Wassmer
#preflight 629248ec2256738f75de9b32
#codereviewnumbers 20320742, 20320791, 20320799, 20320756, 20320809, 20320830, 20320840, 20320846, 20320851, 20320863, 20320780, 20320765, 20320876, 20320786
#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 20430220 via CL 20433854 via CL 20435474 via CL 20435484
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)
[CL 20448496 by robert manuszewski in ue5-main branch]
- Explicit GFP state transition canceling
- Implicit GFP state transition canceling (happens if setting a destination incompatible with the current destination)
- Fix possibility of GFP state machine being garbage collected while still in update loop (seen in UEFN)
- Fix state machine not correctly checking compatibility between current destination and new destination if destination is changed while running.
[REVIEW] [at]Bob.Tellez, [at]Graeme.Thornton, [at]Daniel.Lamb, [at]Dave.Belanger
#preflight 628e951bc511f67c9fe4e6c9
#ROBOMERGE-OWNER: justin.marcus
#ROBOMERGE-AUTHOR: justin.marcus
#ROBOMERGE-SOURCE: CL 20372089 via CL 20372734 via CL 20373086 via CL 20373102
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246)
[CL 20374094 by justin marcus in ue5-main branch]
Solved Problems:
It was impossible to know if it was ok to change destination states if the state machine was currently running.
If the state machine was running, setting a new destination would stomp any existing callbacks without calling them.
If was impossible to know if the current tranistion needed be canceld because there was no way to tell if the new destination state was complatible with the intent of the current state transition.
Changes:
- Instead of passing a single destination state pass a range acceptable destination states to the machine. This communicates the intent of the caller.
- If the machine is running, then the intersection of any new range and the existing range will satisfy both requests.
- If there is no intersection, the request can't be satisified and is refused (I'll change this to an actual implementation of canceling in a future change list)
- The state machine tracks multiple completion callbacks, callbacks are no longer stomped and are always called back.
- Stopped deferring a lot of callbacks to next tick since there were still a lot of cases where callbacks could happen immediatlely and it was giving a false sense of the way GFPs worked. Content Beacon V2 should be fine with syncronous callbacks and CBV1 is no longer used. I couldn't find other cases that requried deffered callbacks.
- Clear bInUpdateStateMachine before the state machine calls back so that callbacks can force new state machine updates. This was a common cause of adding deffered callbacks in some cases.
- Since machines can now track multiple callbacks, FGameFeaturePluginState_WaitingForDependencies no longer needs special case state transition callbacks
- Moved a few things into the UE::GameFeatures namespace.
[FYI] Bob.Tellez, Graeme.Thornton, Daniel.Lamb, Dave.Belanger
#ROBOMERGE-AUTHOR: justin.marcus
#ROBOMERGE-SOURCE: CL 20245903 via CL 20245946 via CL 20245992 via CL 20246016
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)
[CL 20250951 by justin marcus in ue5-main branch]
#preflight 627164245e6ce673f449a301
#ROBOMERGE-AUTHOR: justin.marcus
#ROBOMERGE-SOURCE: CL 20030080 via CL 20032549 via CL 20032564 via CL 20032576
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)
[CL 20035148 by justin marcus in ue5-main branch]
#preflight
#ROBOMERGE-AUTHOR: justin.marcus
#ROBOMERGE-SOURCE: CL 19789817 via CL 19791856 via CL 19791872 via CL 19791883
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v939-19570697)
[CL 19809568 by justin marcus in ue5-main branch]
Ensure: OnPlaylistDataLoadCompleted failed to find plugin URL
I'd rather not make this change so I'll investigate why it happens with this particular plugin
#rb none
#preflight skip
#ROBOMERGE-AUTHOR: dave.belanger
#ROBOMERGE-SOURCE: CL 19750556 via CL 19751354 via CL 19751360 via CL 19751362
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v939-19570697)
[CL 19801897 by dave belanger in ue5-main branch]
Soft-deprecate GetPluginURLForBuiltInPluginByName and replace it by GetPluginURLForRegisteredPluginByName
Will do the actual deprecation in a separate CL
#rb Bob.Tellez
#preflight 62570f9977269238e170d131
#ROBOMERGE-AUTHOR: dave.belanger
#ROBOMERGE-SOURCE: CL 19749517 via CL 19750894 via CL 19750906 via CL 19750911
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v939-19570697)
[CL 19801892 by dave belanger in ue5-main branch]
- Only do a GC in Deactivating or Unloading states if the final destination state is the same as the state they are transitioning to, otherwise do all GC in Unregistering state.
- When a transition requires a GC, the transition now waits until the GC is complete.
[REVIEW] [at]Bob.Tellez [at]Michael.Noland [at]Graeme.Thornton
#preflight https://horde.devtools.epicgames.com/job/62549441845ab4b0b4a825ed
#ROBOMERGE-AUTHOR: justin.marcus
#ROBOMERGE-SOURCE: CL 19719368 via CL 19720296 via CL 19720305 via CL 19720325
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)
[CL 19721931 by robomerge in ue5-main branch]
Reduce boiler-plate when adding GFP states.
EGameFeaturePluginState no longer must be cast to int when accessing state array.
Fix private header GameFeaturePluginStateMachine.h being directly included by other modules.
[REVIEW] [at]Bob.Telez
#preflight 62542e69f4122c9e9af0a698
#ROBOMERGE-OWNER: justin.marcus
#ROBOMERGE-AUTHOR: justin.marcus
#ROBOMERGE-SOURCE: CL 19706165 via CL 19707821 via CL 19707964 via CL 19707978
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)
[CL 19708767 by justin marcus in ue5-main branch]