Understanding build output
↑How it works and why
Section titled “How it works and why”A desktop build contains an executable, game data and supporting libraries. Copying only the executable usually breaks the player. Keep the entire generated output directory together; exact files depend on Unity version, scripting backend and build settings.
| Player target | Typical output | Packaging |
|---|---|---|
| Windows 10 and Windows 11 x64 | Game.exe, Game_Data/, UnityPlayer.dll, plus generated dependencies |
ZIP of all contents of Builds/Windows/ |
| Linux x64 | Game.x86_64, Game_Data/, UnityPlayer.so, plus generated dependencies |
tar.gz of Builds/Linux/, preserving executable permissions |
Windows 10 and 11 share the Windows build format; verify the player on both. A Windows executable does not run natively on Linux, and a Linux executable does not run natively on Windows. Distribute and test a separate artifact for each target. Keep debug symbols privately when appropriate, but do not guess which runtime dependencies can be removed.
Record Unity version, target, scripting backend, commit, profile/configuration and test status with each release. Keep generated binaries outside Assets/ and out of source control.
Windows 10 and Windows 11: inspect and package with PowerShell
Section titled “Windows 10 and Windows 11: inspect and package with PowerShell”This works in Windows PowerShell 5.1 and PowerShell 7. Run from the Unity project root after creating the Windows build. It uses .NET ZIP support to include hidden files too, which Compress-Archive can omit. Choose a new archive name for each release; CreateFromDirectory fails if the archive already exists.
$ErrorActionPreference = 'Stop'$BuildDirectory = (Resolve-Path -LiteralPath '.\Builds\Windows').PathGet-ChildItem -LiteralPath $BuildDirectory -Recurse -File -Force | Sort-Object FullName | Select-Object FullName, Length
Add-Type -AssemblyName System.IO.Compression.FileSystem$ArchivePath = Join-Path (Split-Path -Parent $BuildDirectory) 'Windows-player.zip'[System.IO.Compression.ZipFile]::CreateFromDirectory($BuildDirectory, $ArchivePath)The ZIP contains the build directory’s contents. Extract to a new test directory with Explorer’s Extract All or these PowerShell commands, then launch Game.exe:
Expand-Archive -LiteralPath '.\Builds\Windows-player.zip' -DestinationPath '.\Builds\Windows-smoke'& '.\Builds\Windows-smoke\Game.exe'Linux: inspect and package with Bash
Section titled “Linux: inspect and package with Bash”Run from the Unity project root after creating the Linux build. find includes hidden files; tar keeps directory structure and executable permissions. Use a fresh archive filename for each release.
#!/usr/bin/env bashset -euo pipefailfind ./Builds/Linux -type f -print | sorttest -x ./Builds/Linux/Game.x86_64tar -czf ./Builds/Linux-player.tar.gz -C ./Builds LinuxExtract to a new directory and launch on Linux:
mkdir -p ./Builds/Linux-smoketar -xzf ./Builds/Linux-player.tar.gz -C ./Builds/Linux-smoke./Builds/Linux-smoke/Linux/Game.x86_64If another transfer tool removed the executable permission, restore it with chmod +x ./Builds/Linux-smoke/Linux/Game.x86_64. Normal tar extraction should preserve it. The test machine still needs the runtime libraries and graphics support required by your Unity version.
When to use it and what can go wrong
Section titled “When to use it and what can go wrong”Archive paths are outside the directories being archived, preventing self-inclusion. Test extracted artifacts on Windows 10, Windows 11 and the Linux distribution you support, ideally without Unity installed. Check startup, scenes, input, saving and logs. A successful archive operation alone does not prove a working release.
With default player logging enabled, Windows 10/11 writes Player.log under %USERPROFILE%\AppData\LocalLow\CompanyName\ProductName\; Linux uses ~/.config/unity3d/CompanyName/ProductName/Player.log. Substitute the company/product names from Player Settings; an explicit -logFile argument can change the location.
