Skip to content

Understanding build output

↑

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.

InspectBuild.ps1 : Windows 10 and Windows 11
$ErrorActionPreference = 'Stop'
$BuildDirectory = (Resolve-Path -LiteralPath '.\Builds\Windows').Path
Get-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:

Test the extracted Windows build
Expand-Archive -LiteralPath '.\Builds\Windows-player.zip' -DestinationPath '.\Builds\Windows-smoke'
& '.\Builds\Windows-smoke\Game.exe'

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.

InspectBuild.sh : Linux
#!/usr/bin/env bash
set -euo pipefail
find ./Builds/Linux -type f -print | sort
test -x ./Builds/Linux/Game.x86_64
tar -czf ./Builds/Linux-player.tar.gz -C ./Builds Linux

Extract to a new directory and launch on Linux:

Test the extracted Linux build
mkdir -p ./Builds/Linux-smoke
tar -xzf ./Builds/Linux-player.tar.gz -C ./Builds/Linux-smoke
./Builds/Linux-smoke/Linux/Game.x86_64

If 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.

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.