-
Notifications
You must be signed in to change notification settings - Fork 492
Update .Bat file and Bug fix on ManageScript #355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,7 @@ echo. | |
|
|
||
| :: Configuration | ||
| set "DEFAULT_BACKUP_DIR=%USERPROFILE%\Desktop\unity-mcp-backup" | ||
| set "DEFAULT_SERVER_PATH=%LOCALAPPDATA%\Programs\UnityMCP\UnityMcpServer\src" | ||
| set "DEFAULT_SERVER_PATH=%LOCALAPPDATA%\UnityMCP\UnityMcpServer\src" | ||
|
|
||
| :: Get user inputs | ||
| echo Please provide the following paths: | ||
|
|
@@ -102,7 +102,8 @@ echo =============================================== | |
| echo WARNING: This will overwrite current files! | ||
| echo =============================================== | ||
| echo Restoring from: %SELECTED_BACKUP% | ||
| echo Unity Bridge target: %PACKAGE_CACHE_PATH%\Editor | ||
| echo Unity Bridge Editor target: %PACKAGE_CACHE_PATH%\Editor | ||
| echo Unity Bridge Runtime target: %PACKAGE_CACHE_PATH%\Runtime | ||
| echo Python Server target: %SERVER_PATH% | ||
| echo. | ||
| set /p "confirm=Continue with restore? (y/N): " | ||
|
|
@@ -119,16 +120,29 @@ echo =============================================== | |
|
|
||
| :: Restore Unity Bridge | ||
| if exist "%SELECTED_BACKUP%\UnityBridge\Editor" ( | ||
| echo Restoring Unity Bridge files... | ||
| echo Restoring Unity Bridge Editor files... | ||
| rd /s /q "%PACKAGE_CACHE_PATH%\Editor" 2>nul | ||
| xcopy "%SELECTED_BACKUP%\UnityBridge\Editor\*" "%PACKAGE_CACHE_PATH%\Editor\" /E /I /Y > nul | ||
| if !errorlevel! neq 0 ( | ||
| echo Error: Failed to restore Unity Bridge files | ||
| echo Error: Failed to restore Unity Bridge Editor files | ||
| pause | ||
| exit /b 1 | ||
| ) | ||
| ) else ( | ||
| echo Warning: No Unity Bridge backup found, skipping... | ||
| echo Warning: No Unity Bridge Editor backup found, skipping... | ||
| ) | ||
|
|
||
| if exist "%SELECTED_BACKUP%\UnityBridge\Runtime" ( | ||
| echo Restoring Unity Bridge Runtime files... | ||
| rd /s /q "%PACKAGE_CACHE_PATH%\Runtime" 2>nul | ||
| xcopy "%SELECTED_BACKUP%\UnityBridge\Runtime\*" "%PACKAGE_CACHE_PATH%\Runtime\" /E /I /Y > nul | ||
| if !errorlevel! neq 0 ( | ||
| echo Error: Failed to restore Unity Bridge Runtime files | ||
| pause | ||
| exit /b 1 | ||
| ) | ||
| ) else ( | ||
| echo Warning: No Unity Bridge Runtime backup found, skipping... | ||
| ) | ||
|
Comment on lines
+135
to
146
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chainRuntime restoration block successfully implements PR objective. The new Runtime restoration logic correctly mirrors the Editor block with appropriate error handling and messaging. This addresses the PR objective to include the runtime folder in the restore workflow. Verify that the backup script ( 🏁 Script executed: #!/bin/bash
# Description: Verify backup script creates UnityBridge\Runtime directory structure
# Search for Runtime backup logic in backup-dev.bat
rg -n "Runtime|UnityBridge" -g "backup-dev.bat" -C3Length of output: 148 🏁 Script executed: #!/bin/bash
# Description: Locate and examine backup-dev.bat for Runtime directory handling
# First, find the backup-dev.bat file
echo "=== Locating backup-dev.bat ==="
fd -n "backup-dev.bat"
# Then search for Runtime-related content
echo ""
echo "=== Searching for Runtime in backup script ==="
rg -n "Runtime" -C3Length of output: 85453 🏁 Script executed: #!/bin/bash
# Description: Locate backup-dev.bat and verify Runtime backup logic
# Find backup-dev.bat using correct fd syntax
echo "=== Finding backup-dev.bat ==="
fd "backup-dev.bat"
# Once located, examine its contents for UnityBridge\Runtime
echo ""
echo "=== Examining backup-dev.bat for Runtime backup logic ==="
find . -name "backup-dev.bat" -type f -exec cat {} \;Length of output: 89 🏁 Script executed: #!/bin/bash
# Description: Search for backup-related scripts
echo "=== All .bat files in repository ==="
find . -name "*.bat" -type f
echo ""
echo "=== All .sh and .ps1 files ==="
find . -name "*.sh" -o -name "*.ps1" | head -20
echo ""
echo "=== Search for 'backup' in script filenames ==="
find . -type f \( -name "*backup*" \)
echo ""
echo "=== Check if restore-dev.bat references backup-dev.bat ==="
grep -n "backup-dev" restore-dev.bat 2>/dev/null || echo "No reference found"Length of output: 266 Backup script does not exist — restore functionality cannot work. The restore block at lines 135-146 assumes backups exist at Implement backup functionality (at minimum, a 🤖 Prompt for AI Agents |
||
|
|
||
| :: Restore Python Server | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.