```
feat(Materials): 更新CoreBattleGround材质贴图和缩放参数
更换了CoreBattleGround材质的主纹理,将纹理GUID从73e4d6cf089824c0cadfcefa5b15d306
更新为c6af6f473739fb546ac7775e5c957da1,并调整纹理缩放参数从{x: 3, y: 4}修改为
{x: 1, y: 1},同时移除了多余的_MetallicGlossMap配置项。
```
This commit is contained in:
1 parent
9658decd6c
commit
c09e15dd0e
369 files changed
+129868
-792
No files matched your search
@@ -0,0 +1,80 @@
|
||||
param(
|
||||
[switch]$Check,
|
||||
[switch]$NoStage
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path
|
||||
Set-Location $repoRoot
|
||||
|
||||
$mode = if ($Check) { "check" } else { "fix" }
|
||||
$autoStage = -not $NoStage
|
||||
|
||||
function New-GuidHex {
|
||||
return [Guid]::NewGuid().ToString("N")
|
||||
}
|
||||
|
||||
$invalidCount = 0
|
||||
$fixedCount = 0
|
||||
|
||||
$metaFiles = Get-ChildItem -Path . -Recurse -Filter *.meta -File |
|
||||
Where-Object {
|
||||
$_.FullName -notmatch '\\\.git\\' -and
|
||||
$_.FullName -notmatch '\\build\\' -and
|
||||
$_.FullName -notmatch '\\obj\\'
|
||||
}
|
||||
|
||||
foreach ($file in $metaFiles) {
|
||||
$content = Get-Content -Path $file.FullName -Raw
|
||||
$guidMatch = [regex]::Match($content, '(?m)^guid:\s*(\S+)\s*$')
|
||||
if (-not $guidMatch.Success) {
|
||||
continue
|
||||
}
|
||||
|
||||
$guid = $guidMatch.Groups[1].Value
|
||||
if ($guid -match '^[a-f0-9]{32}$') {
|
||||
continue
|
||||
}
|
||||
|
||||
$invalidCount++
|
||||
$newGuid = New-GuidHex
|
||||
|
||||
if ($mode -eq "fix") {
|
||||
$newContent = [regex]::Replace($content, '(?m)^guid:\s*\S+\s*$', "guid: $newGuid", 1)
|
||||
[System.IO.File]::WriteAllText($file.FullName, $newContent)
|
||||
|
||||
if ($autoStage) {
|
||||
git add -- $file.FullName | Out-Null
|
||||
}
|
||||
|
||||
Write-Output "FIXED $($file.FullName): $guid -> $newGuid"
|
||||
$fixedCount++
|
||||
}
|
||||
else {
|
||||
Write-Output "INVALID $($file.FullName): $guid (would fix to $newGuid)"
|
||||
}
|
||||
}
|
||||
|
||||
if ($invalidCount -eq 0) {
|
||||
Write-Output "All .meta GUIDs are valid."
|
||||
exit 0
|
||||
}
|
||||
|
||||
if ($mode -eq "check") {
|
||||
Write-Output ""
|
||||
Write-Output "Found $invalidCount invalid .meta GUID(s)."
|
||||
Write-Output "Run to fix:"
|
||||
Write-Output " .\scripts\fix-meta-guids.ps1"
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Output ""
|
||||
Write-Output "Fixed $fixedCount invalid .meta GUID(s)."
|
||||
if ($autoStage) {
|
||||
Write-Output "Staged fixed .meta files automatically."
|
||||
}
|
||||
else {
|
||||
Write-Output "Remember to stage fixed files manually."
|
||||
}
|
||||
Write-Output "You can run git commit again."
|
||||
Reference in new issue
Block a user