Unity - Scripting API: StandaloneBuildSubtarget.Server

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Uses a player build optimized to run as a headless server.

When StandaloneBuildSubtarget.Server is selected, Unity compiles the standalone player for each target platform as follows:

MacOS Player: Compiled as a standard console application.

Windows Player: Compiled with /System:Console and runs as a standard Windows console application.

Linux Player: Compiled as a standard console application.

Unity defines UNITY_SERVER when it compiles scripts for a dedicated server build.