docs: anonymise project asset names in source comments
Measured figures are kept; only the studio-specific level and asset names are generalised, and the Perforce rationale is reworded to describe the class of setups rather than this one project. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -252,8 +252,8 @@ namespace AssetDependencyClosure
|
||||
// comes from a level or from one of its external actor packages - the shape a
|
||||
// streaming sublevel or a Level Instance actually has. A World named by an ordinary
|
||||
// asset is a different location that happens to be mentioned, and following it
|
||||
// exports someone else's map: measured on WP_Main, the chain
|
||||
// BP_FirstPersonGameMode -> PDA_MenuSystemConfig -> L_MainLevel accounts for 9994
|
||||
// exports someone else's map: measured on WP_Example, the chain
|
||||
// BP_GameMode -> PDA_MenuConfig -> L_Other accounts for 9994
|
||||
// packages. FLevelUsageResolver applies the same rule; the two must not disagree
|
||||
// about the same graph.
|
||||
if (IsLevelPackage(Dependency))
|
||||
|
||||
@@ -146,7 +146,7 @@ namespace AssetImporter
|
||||
continue;
|
||||
}
|
||||
|
||||
// This project is Perforce-primary, so an existing target is very likely read-only.
|
||||
// Perforce-primary projects keep unopened files read-only, so an existing target is very likely read-only.
|
||||
// Without clearing the flag the copy fails with an error that reads like a permissions
|
||||
// problem rather than "the file is not checked out".
|
||||
if (bTargetOnDisk && FileManager.IsReadOnly(*DestinationPath))
|
||||
|
||||
@@ -536,7 +536,7 @@ FAssetUsageExporter::FResult FAssetUsageExporter::CopyExpandedPackages(const TAr
|
||||
|
||||
const bool bWasPresent = FileManager.FileExists(*DestinationPath);
|
||||
|
||||
// This repository is Perforce-primary, so the source .uasset is very often read-only on
|
||||
// Perforce-primary repositories keep unopened files read-only, so the source .uasset is very often read-only on
|
||||
// disk. Windows CopyFile carries that attribute across, which would make the export folder
|
||||
// read-only too - and then an Overwrite-policy re-export fails on its own previous output.
|
||||
// Clear the flag on both ends of the problem: before writing over an existing file, and
|
||||
|
||||
@@ -243,8 +243,8 @@ void FLevelUsageResolver::TraverseLevel(int32 LevelIndex, const FLevelUsageResol
|
||||
}
|
||||
|
||||
// Reaching another World is NOT automatically a sublevel. An earlier version assumed it
|
||||
// was, and on WP_Main that assumption pulled the whole of L_MainLevel in through
|
||||
// BP_FirstPersonGameMode -> PDA_MenuSystemConfig: 9994 of 18136 rows belonged to a
|
||||
// was, and on WP_Example that assumption pulled the whole of L_Other in through
|
||||
// BP_GameMode -> PDA_MenuConfig: 9994 of 18136 rows belonged to a
|
||||
// different map. A crossing only counts when the reference comes from the level package
|
||||
// itself or from one of its external actor packages, which is the shape a streaming
|
||||
// sublevel or a Level Instance actually has.
|
||||
|
||||
@@ -73,8 +73,8 @@ namespace AssetDependencyClosure
|
||||
* Maps reached through an ordinary asset rather than through a level, and therefore not
|
||||
* followed - nor included.
|
||||
*
|
||||
* The same rule FLevelUsageResolver applies, and for the same measured reason: on WP_Main
|
||||
* the chain BP_FirstPersonGameMode -> PDA_MenuSystemConfig -> L_MainLevel drags in 9994
|
||||
* The same rule FLevelUsageResolver applies, and for the same measured reason: on WP_Example
|
||||
* the chain BP_GameMode -> PDA_MenuConfig -> L_Other drags in 9994
|
||||
* packages belonging to a different map. Without this the export dialog would quote an
|
||||
* honest number for a wrong set.
|
||||
*
|
||||
|
||||
@@ -139,7 +139,7 @@ enum class EExportCollisionPolicy : uint8
|
||||
*/
|
||||
struct ASSETUSAGEAUDITCORE_API FAssetUsageRow
|
||||
{
|
||||
/** Package name, e.g. /Game/Space/Art/SM_Rock. */
|
||||
/** Package name, e.g. /Game/Art/SM_Rock. */
|
||||
FName PackageName;
|
||||
|
||||
/** Asset name without path. */
|
||||
@@ -154,7 +154,7 @@ struct ASSETUSAGEAUDITCORE_API FAssetUsageRow
|
||||
*/
|
||||
FTopLevelAssetPath GeneratedClassPath;
|
||||
|
||||
/** Path relative to the project root, e.g. Content/Space/Art/SM_Rock.uasset. */
|
||||
/** Path relative to the project root, e.g. Content/Art/SM_Rock.uasset. */
|
||||
FString PathFromProjectRoot;
|
||||
|
||||
EAssetUsageVerdict Verdict = EAssetUsageVerdict::Unknown;
|
||||
@@ -172,7 +172,7 @@ struct ASSETUSAGEAUDITCORE_API FAssetUsageRow
|
||||
|
||||
/**
|
||||
* Human-readable chain explaining the verdict, e.g.
|
||||
* "WP_Main -> __ExternalActors__/.../A2B -> BP_Rock -> SM_Rock".
|
||||
* "WP_Example -> __ExternalActors__/.../A2B -> BP_Rock -> SM_Rock".
|
||||
* A verdict without a route is unactionable for an artist.
|
||||
*/
|
||||
FString Route;
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace AssetUsagePaths
|
||||
|
||||
/**
|
||||
* Package name to a path relative to the project root, as the report requires.
|
||||
* "/Game/Space/Art/SM_Rock" -> "Content/Space/Art/SM_Rock.uasset"
|
||||
* "/Game/Art/SM_Rock" -> "Content/Art/SM_Rock.uasset"
|
||||
*
|
||||
* @param bIsLevel Chooses the .umap extension over .uasset.
|
||||
* @return Empty for packages with no project-relative form, e.g. /Script or /Engine.
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
struct FIndirectReference
|
||||
{
|
||||
/** Package name the literal resolved to, e.g. /Game/Space/Core/GameModes/BP_FirstPersonGameMode. */
|
||||
/** Package name the literal resolved to, e.g. /Game/Core/GameModes/BP_GameMode. */
|
||||
FName PackageName;
|
||||
|
||||
/** Absolute path of the file the literal was found in. */
|
||||
@@ -28,7 +28,7 @@ struct FIndirectReference
|
||||
* Finds asset paths referenced from text rather than from a package.
|
||||
*
|
||||
* This exists because of a concrete, measured failure mode on this project: Config/DefaultEngine.ini
|
||||
* names BP_FirstPersonGameMode, BP_MenuSystemGameInstance, RefinedMenuMap and Gyms_Geoda as plain
|
||||
* names BP_GameMode, BP_MenuGameInstance, RefinedMenuMap and Gyms_Geoda as plain
|
||||
* strings. No asset references them, so the Asset Registry reports zero referencers and a naive
|
||||
* audit calls the project's GameMode unused.
|
||||
*
|
||||
|
||||
@@ -37,8 +37,8 @@ struct FLevelUsageResolveOptions
|
||||
*
|
||||
* Off by default, and that default is load-bearing. A map does not only reference its own
|
||||
* sublevels: anything it can reach may name an unrelated map, and on this project it does.
|
||||
* WP_Main -> BP_FirstPersonGameMode -> PDA_MenuSystemConfig -> L_MainLevel drags in the whole
|
||||
* of L_MainLevel, which measured at 9994 of WP_Main's 18136 rows - two thirds of the answer
|
||||
* WP_Example -> BP_GameMode -> PDA_MenuConfig -> L_Other drags in the whole
|
||||
* of L_Other, which measured at 9994 of WP_Example's 18136 rows - two thirds of the answer
|
||||
* was another level's content.
|
||||
*
|
||||
* With this off, a foreign map is still reported as referenced, but its contents are attributed
|
||||
@@ -72,7 +72,7 @@ struct FLevelUsageStats
|
||||
* Foreign maps referenced but deliberately not expanded into.
|
||||
*
|
||||
* A non-zero value here is the amount of another level's content that would otherwise have
|
||||
* been attributed to this one. Worth surfacing: on WP_Main it was two thirds of the report.
|
||||
* been attributed to this one. Worth surfacing: on WP_Example it was two thirds of the report.
|
||||
*/
|
||||
int32 ForeignLevelsNotExpanded = 0;
|
||||
double ScanLevelAssetsSeconds = 0.0;
|
||||
|
||||
Reference in New Issue
Block a user