This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485
[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
Always construct a UMeshDescriptionBase as a default subobject of the MeshDescriptionBulkData object, which can be recycled each time a UMeshDescriptionBase is required for that LOD.
Put GC scope guards around NewObject<> allocations to avoid clashes with GC when allocated on a thread.
Also identified other static mesh subobjects which can be potentially created in cooking commandlets when GC is taking place.
#jira UE-109204
#jira UE-109439
[FYI] Danny.Couture
#ROBOMERGE-SOURCE: CL 15534994 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)
[CL 15535009 by richard talbotwatkin in ue5-main branch]
StaticMesh hi res source model bulk data is no longer a default subobject; instead it is instanced if it was not present in PostLoad, thus fixing issues with object name differences.
MeshDescriptionBaseBulkData is marked as NeedsLoadForEditorGame, as well as not needing load for client or server, so that it can be loaded correctly.
#jira UE-108938
#ROBOMERGE-SOURCE: CL 15481115 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)
[CL 15481116 by richard talbotwatkin in ue5-main branch]
Made the HiResSourceModel MeshDescriptionBulkData a regular default subobject, so that it is still valid in Editor -game builds.
#jira UE-108938
#rb Robert.Manuszewski
#ROBOMERGE-SOURCE: CL 15471361 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)
[CL 15471367 by richard talbotwatkin in ue5-main branch]
- Moved source models related classes and implementation into separate files.
- Created a new UObject wrapper for holding mesh description bulk data; this is created as a transactable object inside a UStaticMesh.
- The cached mesh description is now an inner object of the bulk data wrapper; this allows transactions on the bulk data to affect the cached mesh.
- The static mesh SourceModels array can no longer be accessed directly: FStaticMeshSourceModel requires extra initialization before it should be used, so new LODs should be added through the static mesh API.
- Undo/redo is now fixed within the geometry tools
- Fixed regression where mesh description was being unpacked unnecessarily during transactions
- MeshDescription bulk data and its cached MeshDescriptions are now emptied prior to removing the UObject reference, in order to immediately free memory instead of needing to wait for garbage collection
- No more deadlocks when clearing or committing mesh descriptions during garbage collection
- Bulk data UObjects are constructed, where possible, at startup, in order to prevent it from happening during critical moments, e.g. during garbage collection or package saving.
#rb Danny.Couture, Alexis.Matte, Ryan.Schmidt
[CL 15420827 by Richard TalbotWatkin in ue5-main branch]