From 014ca0000a75a57fc1b73fbef0a6375b9a75c67f Mon Sep 17 00:00:00 2001 From: dionmoustos Date: Tue, 23 Jun 2026 21:09:34 +0930 Subject: [PATCH] more --- .../TMP_SDF-URP Unlit.shadergraph.meta | 10 +++++ ci/Build-Windows.ps1 | 41 ------------------- cleanup.ps1 | 36 ++++++++++++++++ 3 files changed, 46 insertions(+), 41 deletions(-) create mode 100644 cleanup.ps1 diff --git a/Assets/TextMesh Pro/Shaders/TMP_SDF-URP Unlit.shadergraph.meta b/Assets/TextMesh Pro/Shaders/TMP_SDF-URP Unlit.shadergraph.meta index 248825c..b5fc218 100644 --- a/Assets/TextMesh Pro/Shaders/TMP_SDF-URP Unlit.shadergraph.meta +++ b/Assets/TextMesh Pro/Shaders/TMP_SDF-URP Unlit.shadergraph.meta @@ -8,3 +8,13 @@ ScriptedImporter: assetBundleName: assetBundleVariant: script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} + useAsTemplate: 0 + exposeTemplateAsShader: 0 + indexedData: {instanceID: 0} + template: + name: + category: + description: + icon: {instanceID: 0} + thumbnail: {instanceID: 0} + order: 0 diff --git a/ci/Build-Windows.ps1 b/ci/Build-Windows.ps1 index 2b6fdf2..4d70b5d 100644 --- a/ci/Build-Windows.ps1 +++ b/ci/Build-Windows.ps1 @@ -138,44 +138,6 @@ try { $process.WaitForExit() - # ----------------------------- - # Wait for log file creation - # ----------------------------- - $timeoutSeconds = 60 - $elapsed = 0 - - while (!(Test-Path $logFile) -and $elapsed -lt $timeoutSeconds) { - Start-Sleep -Seconds 1 - $elapsed++ - } - - if (!(Test-Path $logFile)) { - throw "Unity log file was not created at: $logFile" - } - - # ----------------------------- - # Wait for file writes to finish - # ----------------------------- - $previousLength = -1 - - do { - $currentLength = (Get-Item $logFile).Length - - if ($currentLength -eq $previousLength) { - break - } - - $previousLength = $currentLength - - Start-Sleep -Milliseconds 500 - - } while ($true) - - # ----------------------------- - # Archive log - # ----------------------------- - Copy-Item $logFile $artifactLog -Force - # ----------------------------- # Build failed # ----------------------------- @@ -221,7 +183,4 @@ try { catch { Write-Error $_.Exception.Message exit 1 -} -finally { - Write-Host "Cleanup complete." } \ No newline at end of file diff --git a/cleanup.ps1 b/cleanup.ps1 new file mode 100644 index 0000000..08048c2 --- /dev/null +++ b/cleanup.ps1 @@ -0,0 +1,36 @@ +# CleanUnityProject.ps1 +# Run this script from your root Unity project directory. + +$ProjectRoot = Get-Item . + +# 1. Verification checks +if (!(Test-Path (Join-Path $ProjectRoot "Assets")) -or !(Test-Path (Join-Path $ProjectRoot "ProjectSettings"))) { + Write-Error "Error: This does not look like a Unity project root directory. 'Assets' or 'ProjectSettings' folder missing." + Exit +} + +Write-Host "Starting Unity project cleanup in: $($ProjectRoot.FullName)" -ForegroundColor Cyan + +# 2. Define folders and files safe to delete +$TargetFolders = @("Library", "Temp", "Logs", "obj","Builds") +$TargetExtensions = @("*.csproj", "*.sln", "*.userprefs") + +# 3. Delete target directories +foreach ($Folder in $TargetFolders) { + $FolderPath = Join-Path $ProjectRoot $Folder + if (Test-Path $FolderPath) { + Write-Host "Removing directory: $Folder..." -ForegroundColor Yellow + Remove-Item -Path $FolderPath -Recurse -Force -ErrorAction SilentlyContinue + } +} + +# 4. Delete target IDE files +foreach ($Ext in $TargetExtensions) { + $Files = Get-ChildItem -Path $ProjectRoot -Filter $Ext + foreach ($File in $Files) { + Write-Host "Removing file: $($File.Name)..." -ForegroundColor Yellow + Remove-Item -Path $File.FullName -Force -ErrorAction SilentlyContinue + } +} + +Write-Host "Cleanup complete! It is now safe to back up your project or open it fresh in Unity." -ForegroundColor Green