Eonevolve Learning
Unity and DevelopmentUnity and codeAdvanced~5 min

Build Settings and Platform Targets: What Changes at Build Time

Snapshot

~75 sec

Playing in the Editor and running a built player are not the same thing. Switching the active platform in Build Settings changes compiled defines, texture compression, and which APIs are even available - decisions that stay invisible until you actually build.

You will learn

  • Name two things that change when you switch the active build platform.
  • Explain why an Editor-only play test can hide a platform-specific bug.
  • Recognize a scripting define used to branch platform-specific code.

Target outcome

You can explain why "it works in the Editor" is not the same claim as "it works on device."

Visual walkthrough

Visual walkthrough

~5 min

  1. What actually changes at build time

    • Active platform

      The target (iOS, Android, PC) selected in Build Settings, which changes compiled output.

    • Scripting define

      A compiler symbol (like UNITY_ANDROID) used to branch code per platform.

    • Texture / asset import settings

      Compression and quality settings that can differ per platform for the same source asset.

  2. From Editor play to a built player

    Each stage can silently hide or reveal a platform-specific issue the previous stage did not.

    1. Editor play mode

      Fast iteration, but runs with Editor-only conveniences and desktop resources.

    2. Active platform selected

      Build Settings picks the target and its compiled defines.

    3. Built player

      A real executable using target-specific compression, APIs, and permissions.

    4. Running on device

      Real hardware limits and OS behavior finally apply.

    Each stage can silently hide or reveal a platform-specific issue the previous stage did not.

    Reading order

    1. Editor play mode

      Fast iteration, but runs with Editor-only conveniences and desktop resources.

    2. Active platform selected

      Build Settings picks the target and its compiled defines.

    3. Built player

      A real executable using target-specific compression, APIs, and permissions.

    4. Running on device

      Real hardware limits and OS behavior finally apply.

    Connection explanations

    1. Active platform selected → Built player (compiles for)

      Switching the active platform recompiles scripts with different defines and re-imports assets with that platform's settings.

    2. Built player → Running on device (installs onto)

      Only the real device enforces hardware memory limits, OS permission prompts, and true frame timing.

  3. Explain the device-only crash

    A save feature works perfectly in the Editor but crashes only on the built mobile player. What category of difference should you check first?

    Expected reasoning

    Platform-specific file system or permission behavior. The Editor often has broader file access than a sandboxed mobile build, so a save path or permission the Editor tolerates silently can fail once the app runs under the target platform's real restrictions.

Go deeper