* Removed deprecated or dead code paths
* Simplified build system setup for physics support
* Deprecated build system flags and unsupported macros
#jira none
#rb Chris.Caulfield, Kriss.Gossart
#preflight 62963ec0fe779f23c8ea0c5e
[CL 20450744 by Benn Gallagher 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]
The four places this applies include UEditorEngine::Tick, UGameEngine::Tick, FAdvancedPreviewScene::Tick, and FPreviewScene::UpdateCaptureContents. The last example is called from FBlueprintEditor::Tick and FThumbnailPreviewScene::Tick.
The counter-example is "UEditorEngine::BuildReflectionCaptures", which doesn't appear to be called anywhere from a Tick related function. It's called in startup functions, various commands, and as part of static lighting generation. If we run into further validation errors, we could add a flag to that function to differentiate those cases. Even though there's only one counter-example, I figured it was best to err on the side of not changing behavior of client code that may also be using the function, so by default "bInsideTick" is set to false.
#jira UE-153604
#rb mihnea.balta jason.nadro
#rnx
#preflight 628d89082f2409bc1e08a42e
[CL 20362380 by jason hoerner in ue5-main branch]
This migrates the mostly declarative action mappings in UVREditorInteractor::Init_Implementation into a new GetKnownActionMappings method, which we can poll in order to translate them into an OpenXR action set at the point during early initialization which OpenXR requires them to be registered. This also adds a `bIsAxis` flag to FViewportActionKeyInput, because axis mappings need to be handled differently.
The glue code leveraging this is introduced in a new VirtualScouting plugin, where we'll ultimately migrate the existing code as well (away from VirtualProductionUtilities).
#jira UE-146105
#rb Lauren.Barnes
#preflight 6261d5b00a1b9c4e192825ce
[CL 19857480 by zach brockway in ue5-main branch]
- Reworked visibility settings into their own structure. Now has separete times for render based culling and view frustum culling.
- Improved Scalability Overrides UI.
- Now caching various view matrices on the world.
- Some 2D debug rendering helpers in Niagara Debug HUD.
#rb stu.mckenna
[FYI] mateo.egey
#preflight 62457713b6084b9832462147
#ROBOMERGE-OWNER: simon.tovey
#ROBOMERGE-AUTHOR: simon.tovey
#ROBOMERGE-SOURCE: CL 19571006 via CL 19571062 via CL 19571069
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)
[CL 19575801 by simon tovey in ue5-main branch]
If realtime was disabled, the force-flush was happening even when PIE was active, which cost a lot of performance.
#jira UE-144517
#rnx
#lockdown Cristina.Riveron
#rb Jeannoe.Morissette
#preflight 622768a6e83598518f2e8268
#ROBOMERGE-AUTHOR: mihnea.balta
#ROBOMERGE-SOURCE: CL 19302848 in //UE5/Release-5.0/... via CL 19303931
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)
[CL 19346857 by mihnea balta in ue5-main branch]
- Fix crash because of Subsystem Init call done through InitializePhysicsSceneForSaveIfNecessary not being matched with Deinit in CleanupPhysicsSceneThatWasInitializedForSave.
This was delaying it to StaticExit() IncrementalPurgeGarbage causing some Subsystem objects to become invalid before the FSubsystemCollectionBase that contained them.
- Original change no longer necessary because CleanupWorldPartition is no longer called from within CleanupLevel
#jira UE-143535
#preflight 6217743b335015645d962f36
#rb matt.peters
#lockdown aurel.cordonnier
#rnx
#ROBOMERGE-AUTHOR: patrick.enfedaque
#ROBOMERGE-SOURCE: CL 19114405 in //UE5/Release-5.0/... via CL 19114673
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)
[CL 19152884 by patrick enfedaque in ue5-main branch]
FArchive now holds a "CookData" blob that contains relevant information for cooking. The TargetPlatform has been moved to this structure, and it has a reference to a CookContext that can hold data generated during the cook that doesn't get serialized to the uasset (in this case, the asset registry tags).
#rb Matt.Peters
#preflight 62151bc4797dbbeb472af77d
#preflight 621011f6ff52bfecfc032b15
#preflight 62152777141b500e17eb24ef
[CL 19076066 by Dan Thompson in ue5-main branch]
When running with ODSC in the editor Materials can have incomplete or partial shader maps. In other words some shaders _might_ be missing. If a render system requires all shaders to be present and can't use ODSC functionality to compile the necessary shaders we need a mechanism for compiling just the missing shaders.
- Added UMaterialInterface::CacheShaders() which is implemented for UMatetrial and UMaterialInstance. The call is just forwarded along to CacheResourceShadersForRendering and InitStaticPermutation respectively.
- You can call CacheResourceShadersForRendering multiple times (even with a completed shader map) and it will not recache uniform expressions. If the Resource's shader map is complete the function is a no-op.
- FObjectCacheContext can accept a UWorld and will only return primitives that are in that world.
- Added a function SubmitRemainingJobsForWorld(UWorld* World, EMaterialShaderPrecompileMode CompileMode) that will iterate all materials used by primitives in the world and compile the missing shaders.
- SubmitRemainingJobsForWorld() is used in various scenarios in the editor to ensure _all_ shaders are compiled for all materials before proceeding.
- Explicitly try to compile UI and PP materials. Since we don't know which ones are used in the given world we just have to iterate all loaded ones. This is a potential area of optimization.
- If there are already complete shader maps (if you are not running with the shader job cache), SubmitRemainingJobsForWorld is fast and results in a no-op for each material.
#rb Arciel.Rekman, Danny.Couture
#jira UE-136442, UE-136447
#preflight 61fc0e9c176256ec4f764206
[CL 18848560 by Jason Nadro in ue5-main branch]