Add com.tivadar.best.socketio to embedded package build steps across all platforms#113
Conversation
…steps Agent-Logs-Url: https://github.com/Five-Squared-Interactive/WebVerse-Runtime/sessions/768e4af9-3d32-427b-8430-29406cfb4528 Co-authored-by: dyfios <16926525+dyfios@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the GitHub Actions runtime build workflow to embed the com.tivadar.best.socketio Unity package (Best SocketIO) alongside the other Best packages, ensuring it is copied into the project during builds and cleaned up afterward across all supported platforms.
Changes:
- Added
com.tivadar.best.socketioto the embedded package copy lists/loops for Windows Desktop, WebGL (compressed/uncompressed), Android, Mac, and iOS jobs. - Added corresponding cleanup removals (
Remove-Item/rm -rf) for the embedded package on all platforms.
Comments suppressed due to low confidence (1)
.github/workflows/build-runtime.yml:159
- In the embedded package copy loop, missing package directories are silently skipped (only copied if the source path exists). If these embedded packages are required for a correct build, consider failing the step (or at least logging a clear ::error::) when an expected package like com.tivadar.best.socketio is not found under UNITY_PACKAGES_PATH, to avoid producing builds without the intended embedded plugin.
foreach ($pkg in $embeddedPackages) {
$sourcePath = Join-Path $packagesPath $pkg
$targetPath = Join-Path "$env:PROJECT_PATH\Packages" $pkg
if (Test-Path $sourcePath) {
if (Test-Path $targetPath) { Remove-Item -Recurse -Force $targetPath }
New-Item -ItemType Directory -Path $targetPath -Force | Out-Null
Copy-Item -Path "$sourcePath\*" -Destination $targetPath -Recurse -Force
Write-Host "Copied $pkg"
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| $packagesPath = "$env:UNITY_PACKAGES_PATH" | ||
| if (-not (Test-Path $packagesPath)) { Write-Host "::error::Packages not found"; exit 1 } | ||
| $embeddedPackages = @("com.occasoftware.super-simple-skybox", "com.tivadar.best.http", "com.tivadar.best.mqtt", "com.tivadar.best.websockets") | ||
| $embeddedPackages = @("com.occasoftware.super-simple-skybox", "com.tivadar.best.http", "com.tivadar.best.mqtt", "com.tivadar.best.websockets", "com.tivadar.best.socketio") |
There was a problem hiding this comment.
The embedded package list is duplicated across multiple jobs in this workflow (Windows/WebGL/Android PowerShell + Mac/iOS bash). Since this PR is fixing an omission caused by that duplication, consider centralizing the package list (e.g., YAML anchor or a single env var) so future package additions only need to be made in one place.
The build workflow copies Best plugins as embedded Unity packages but was missing
com.tivadar.best.socketio(Best SocketIO), which needs to be included alongside the other Best packages.Changes
com.tivadar.best.socketioto$embeddedPackagesarrays (Windows Desktop, WebGL Compressed, WebGL Uncompressed, Android) andfor pkg inloops (Mac, iOS)Remove-Item(PowerShell) andrm -rf(bash) cleanup entries forcom.tivadar.best.socketioon all platforms