Skip to content

Commit 4baecdd

Browse files
committed
Sync sample verification to current plugin master
1 parent bb924c9 commit 4baecdd

8 files changed

Lines changed: 115 additions & 415 deletions

.tasks.jsonl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"id":"GObbKxRA","description":"Sync RuntimeAssetImportSample to current RuntimeAssetImportPlugin and keep only required sample-side changes","stage":"committed","createdAt":"2026-04-12T12:29:44.996Z","updatedAt":"2026-04-12T12:52:31.191Z","committedEventId":"oLgV0L6qtrnH6l0K"}

AGENTS.md

Lines changed: 44 additions & 406 deletions
Large diffs are not rendered by default.

Plugins/RuntimeAssetImport

Submodule RuntimeAssetImport updated 132 files

RuntimeAssetImportSample.uproject

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@
1818
{
1919
"Name": "ProceduralMeshComponent",
2020
"Enabled": true
21-
},
22-
{
23-
"Name": "GeometryScriptingCore",
24-
"Enabled": true
2521
}
2622
]
2723
}

Source/RuntimeAssetImportSample.Target.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ public RuntimeAssetImportSampleTarget(TargetInfo Target) : base(Target)
77
Type = TargetType.Game;
88
DefaultBuildSettings = BuildSettingsVersion.Latest;
99
IncludeOrderVersion = EngineIncludeOrderVersion.Latest;
10+
GlobalDefinitions.Add("__has_feature(x)=0");
1011
ExtraModuleNames.Add("RuntimeAssetImportSample");
1112
}
1213
}

Source/RuntimeAssetImportSample/RuntimeAssetImportSample.Build.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ public class RuntimeAssetImportSample : ModuleRules
55
public RuntimeAssetImportSample(ReadOnlyTargetRules Target) : base(Target)
66
{
77
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
8-
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine" });
8+
bEnableUndefinedIdentifierWarnings = false;
9+
PublicDefinitions.Add("__has_feature(x)=0");
10+
11+
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });
912
}
1013
}

Source/RuntimeAssetImportSampleEditor.Target.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ public class RuntimeAssetImportSampleEditorTarget : TargetRules
55
public RuntimeAssetImportSampleEditorTarget(TargetInfo Target) : base(Target)
66
{
77
Type = TargetType.Editor;
8+
bOverrideBuildEnvironment = true;
89
DefaultBuildSettings = BuildSettingsVersion.Latest;
910
IncludeOrderVersion = EngineIncludeOrderVersion.Latest;
11+
GlobalDefinitions.Add("__has_feature(x)=0");
1012
ExtraModuleNames.Add("RuntimeAssetImportSample");
1113
}
1214
}

Verify.ps1

Lines changed: 62 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,56 @@ function Resolve-ToolPath {
5454
throw "Required command not found: $Name"
5555
}
5656

57+
function Get-CleanTrackedConfigFiles {
58+
param([string]$RepoRoot)
59+
60+
$trackedConfigFiles = & git -C $RepoRoot ls-files -- 'Config/*.ini'
61+
if ($LASTEXITCODE -ne 0) {
62+
throw 'Failed to enumerate tracked config files.'
63+
}
64+
65+
$cleanConfigFiles = @()
66+
foreach ($relativePath in $trackedConfigFiles) {
67+
$isDirty = & git -C $RepoRoot diff --quiet -- $relativePath
68+
if ($LASTEXITCODE -eq 0) {
69+
$cleanConfigFiles += $relativePath
70+
continue
71+
}
72+
if ($LASTEXITCODE -eq 1) {
73+
continue
74+
}
75+
throw "Failed to inspect config file dirtiness: $relativePath"
76+
}
77+
78+
return $cleanConfigFiles
79+
}
80+
81+
function Restore-GeneratedConfigChanges {
82+
param(
83+
[string]$RepoRoot,
84+
[string[]]$RelativePaths
85+
)
86+
87+
foreach ($relativePath in $RelativePaths) {
88+
& git -C $RepoRoot diff --quiet -- $relativePath
89+
if ($LASTEXITCODE -eq 0) {
90+
continue
91+
}
92+
if ($LASTEXITCODE -ne 1) {
93+
throw "Failed to inspect post-verify config dirtiness: $relativePath"
94+
}
95+
96+
& git -C $RepoRoot restore --source=HEAD --worktree -- $relativePath
97+
if ($LASTEXITCODE -ne 0) {
98+
throw "Failed to restore generated config drift: $relativePath"
99+
}
100+
}
101+
}
102+
103+
$repoRoot = $null
104+
$cleanTrackedConfigFiles = @()
105+
$exitCode = 0
106+
57107
try {
58108
$repoRoot = (Resolve-Path $PSScriptRoot).Path
59109
Set-Location $repoRoot
@@ -75,14 +125,16 @@ try {
75125
Write-Info "Repo: $repoRoot"
76126
Write-Info "UE: $ueVersion ($engineRoot)"
77127

128+
$cleanTrackedConfigFiles = Get-CleanTrackedConfigFiles -RepoRoot $repoRoot
129+
78130
if (-not $SkipFormat) {
79131
Write-Info 'Running C++ format check (clang-format --dry-run --Werror) ...'
80132
$clangFormat = Resolve-ToolPath -Name 'clang-format' -EngineRoot $engineRoot
81133
$pluginSrcDir = Join-Path $repoRoot 'Plugins\RuntimeAssetImport\Source'
82134
if (Test-Path -LiteralPath $pluginSrcDir) {
83135
$formatExtensions = @('.h', '.hh', '.hpp', '.cpp', '.cc', '.cxx')
84136
$formatFiles = & git -C (Join-Path $repoRoot 'Plugins\RuntimeAssetImport') ls-files -- 'Source'
85-
foreach ($file in ($formatFiles | Where-Object { $formatExtensions -contains [IO.Path]::GetExtension($_) })) {
137+
foreach ($file in ($formatFiles | Where-Object { $formatExtensions -contains [IO.Path]::GetExtension($_) -and $_ -notlike 'Source/ThirdParty/*' })) {
86138
$fullPath = Join-Path (Join-Path $repoRoot 'Plugins\RuntimeAssetImport') $file
87139
& $clangFormat --dry-run --Werror --style=file $fullPath
88140
if ($LASTEXITCODE -ne 0) { throw "clang-format check failed: $file" }
@@ -115,9 +167,16 @@ try {
115167
}
116168

117169
Write-Info 'VERIFY PASSED'
118-
exit 0
170+
$exitCode = 0
119171
}
120172
catch {
121173
Write-Err $_.Exception.Message
122-
exit 1
174+
$exitCode = 1
123175
}
176+
finally {
177+
if ($null -ne $repoRoot -and $cleanTrackedConfigFiles.Count -gt 0) {
178+
Restore-GeneratedConfigChanges -RepoRoot $repoRoot -RelativePaths $cleanTrackedConfigFiles
179+
}
180+
}
181+
182+
exit $exitCode

0 commit comments

Comments
 (0)