Tag: Unity Build Profiles

  • Cross-Platform Unity Development: One Project, Platform-Specific Delivery

    Cross-Platform Unity Development: One Project, Platform-Specific Delivery

    Unity can share scenes, assets and gameplay code across several targets, but “one identical codebase everywhere” is not a delivery plan. Operating systems differ in input, graphics, memory, lifecycle, permissions, safe areas, storefront services, privacy and release tooling. A maintainable project shares the stable core and isolates platform-specific behaviour behind tested interfaces.

    Start by naming supported target versions and devices. Unity's system-requirements page lists editor and player requirements for a pinned Unity release, but storefront submission rules can change independently (Unity — Unity 6 system requirements). Treat the release matrix as a maintained product decision.

    Article map for Cross-Platform Unity Development: One Project, Platform-Specific Deli…, covering Pin the toolchain and dependency graph, Build a platform-services boundary, Design input and interface for each form facto…
    Article map: Pin the toolchain and dependency graph; Build a platform-services boundary; Design input and interface for each form factor; Use target-specific quality and content budgets.

    Pin the toolchain and dependency graph

    Record the exact Unity editor version, render pipeline, package lock, scripting backend, SDK, NDK, JDK, Xcode and platform modules. Commit ProjectSettings, Packages/manifest.json and Packages/packages-lock.json; exclude generated Library and build output according to the repository policy.

    Upgrade in a branch with a backup and representative build tests. A project opening successfully in a new editor is not evidence that asset bundles, platform SDKs, save data or store integrations still work.

    Keep secrets, signing keys and store credentials out of the repository. CI should receive them through an approved secret store with least privilege and auditable rotation. Do not put production service keys in StreamingAssets or a client script; a shipped client is observable by its user.

    Build a platform-services boundary

    Gameplay should request a capability rather than calling a storefront SDK throughout the project. Define narrow interfaces for services such as:

    • user identity and guest mode;
    • achievements and leaderboards;
    • purchases and entitlement restore;
    • cloud save and conflict resolution;
    • sharing, notifications and review prompts;
    • file paths and local persistence;
    • analytics, consent and crash reporting; and
    • haptics and platform overlays.

    Provide a real adapter per supported platform and a deterministic development adapter. A missing capability needs a defined result—disabled, local fallback or clear error—not a null reference. Feature detection is safer than assuming every device in one platform family behaves identically.

    Keep conditional compilation close to adapter boundaries. A forest of #if directives inside gameplay code makes test coverage and ownership unclear. Validate platform callbacks on the main thread if the SDK requires it, and make asynchronous completion cancellable across scene changes and app suspension.

    Design input and interface for each form factor

    Use gameplay actions rather than hard-coded keys. Unity's Input System is the recommended system for new Unity 6 projects; the legacy UnityEngine.Input API is documented as legacy (Unity — Input System, Unity — legacy Input API).

    Provide bindings and prompts for keyboard and mouse, gamepad and touch according to the actual targets. Support hot-plug, rebinding, dead zones and multiple users where required. Touch interfaces need target sizes, finger occlusion and gesture-conflict tests; a virtual stick copied from desktop controls may not be usable.

    Build layouts around anchors, content constraints and device safe areas rather than one fixed reference resolution. Test narrow, wide, notched, folded and resized viewports as relevant. Text scaling, localisation and right-to-left content can change layout more than aspect ratio.

    Lifecycle behaviour also differs. Define pause, audio, networking, timers, saves and background-work policies for focus loss, suspension, termination and resume. Mobile operating systems may terminate an app without a final graceful shutdown callback, so persist critical progress at safe checkpoints.

    Decision path for Cross-Platform Unity Development: One Project, Platform-Specific Deli…, covering Build a platform-services boundary, Design input and interface for each form factor, Use target-specific quality and con…
    Decision path: Build a platform-services boundary; Design input and interface for each form factor; Use target-specific quality and content budgets; Use Build Profiles as versioned delivery inputs.

    Use target-specific quality and content budgets

    One visual configuration rarely suits every GPU and thermal envelope. Create quality tiers with explicit budgets for:

    • CPU and GPU frame time;
    • resolution and dynamic-resolution policy;
    • texture, mesh, audio and runtime memory;
    • shader variants and render features;
    • lighting, shadows, post-processing and particles;
    • loading and streaming; and
    • download and patch size.

    Do not identify performance by device model string alone. Use a supported capability and quality policy with conservative defaults, then let players adjust settings where appropriate. Test thermal throttling and long sessions, not just a cold one-minute capture.

    Profile a built player. Unity documents that attaching the Profiler to a development build is the most accurate way to profile the target platform; editor profiling includes editor overhead (Unity — Profile your application). Record build hash, device, scene, quality tier and capture duration.

    Use Build Profiles as versioned delivery inputs

    Unity 6 Build Profiles store build configurations as assets. They can preserve independent scene lists, scripting defines and platform settings for development and release variants (Unity — Build Profiles).

    Create named profiles such as:

    • Android development and release;
    • iOS development and release;
    • Windows development and release; and
    • Web development and release, if supported.

    Keep signing and secrets outside the asset. Add a pre-build validation step for application identifiers, version, scenes, backend, architecture, required icons, privacy declarations and environment endpoint. Generate a manifest containing editor, package and source revisions with the artefact.

    Build automation must fail when expected output or tests are missing. A green compile does not mean a store-ready package; signing, entitlements, native SDKs, privacy manifests and upload validation are separate gates.

    Test a matrix on physical devices

    Use layers of evidence:

    Layer Examples
    Fast automated tests gameplay model, save migration, adapters and content validation
    Editor or headless integration scenes, addressable content, input maps and service fakes
    Built smoke tests boot, first-run, suspend/resume, save, settings and shutdown
    Physical-device journeys input, safe area, thermal load, permissions, network changes and purchases in sandbox
    Store validation package, signing, declarations, required SDK and review metadata

    Select a minimum supported device, representative middle tier and at least one device for each distinct graphics or input family. Emulators are useful for automation but do not establish GPU, thermal, sensor, haptic or storefront behaviour.

    Document unsupported combinations and a rollback plan. Monitor crash-free sessions, load failures, performance and service errors with consent-aware telemetry. Do not claim broad compatibility from a small lab matrix.

    For public context on this research series, see Ozlin Info’s public game-development R&D examples.

    Related reading: Cross-platform game input architecture.


    Control and evidence map for Cross-Platform Unity Development: One Project, Platform-Specific Deli…, covering Use target-specific quality and content budgets, Use Build Profiles as versioned delivery inputs, Test a matr…
    Control and evidence map: Use target-specific quality and content budgets; Use Build Profiles as versioned delivery inputs; Test a matrix on physical devices; General-information disclaimer.

    General-information disclaimer

    This article provides general technical information. It does not guarantee compatibility, performance, storefront acceptance or platform certification. Verify current Unity, operating-system, SDK, privacy and storefront requirements for every release.

    AI-assistance disclosure

    AI tools assisted with source discovery, outlining and copyediting. A human reviewer must build and test the pinned project on real targets and verify current platform-holder requirements before publication or release.

    Practical checklist for Cross-Platform Unity Development: One Project, Platform-Specific Deli…, covering Test a matrix on physical devices, General-information disclaimer, AI-assistance disclosure and related review poi…
    Practical checklist: Test a matrix on physical devices; General-information disclaimer; AI-assistance disclosure; Primary sources checked.

    Primary sources checked

    Source access date: 29 August 2026.

  • Your First Unity 6 2D Game in Seven Testable Steps

    Your First Unity 6 2D Game in Seven Testable Steps

    Reviewed: 13 September 2026 · Next review: 13 December 2026
    Author: Ozlin Info Editorial Team · Human review: Lin (accountable human); Codex assisted

    A useful first game is small enough to finish and structured enough to test. This guide builds one scene in which a player moves a square to a goal, shows a success message and can be built for a selected target. It uses a pinned Unity 6 editor, the current Input System and Rigidbody2D.linearVelocity rather than the legacy Input.GetAxis workflow.

    The example is educational. Run it in a new project or branch, record exact versions and inspect every imported asset and package before using it in production.

    1. Pin the project and define “done”

    Install a supported Unity 6 LTS editor through Unity Hub with the module for the first target platform. Record the full editor version. Create a 2D project and initialise source control before adding assets.

    Commit Assets, Packages and ProjectSettings. Exclude generated Library, Temp, Logs, obj and local build directories using an appropriate Unity ignore file. Do not commit signing keys, service credentials or generated store packages.

    Write a tiny acceptance test:

    • the game opens directly into one scene;
    • WASD, arrow keys or a gamepad stick moves the player;
    • the player cannot pass through the border;
    • reaching the goal displays a success panel;
    • Escape or a visible control can exit or return according to platform; and
    • a built player runs on the selected target device.

    This boundary prevents a first project from expanding into inventory, networking and procedural worlds before its basic loop works.

    Article map for Your First Unity 6 2D Game in Seven Testable Steps, covering Pin the project and define “done”, Build the scene with licensed placeholders, Create action-based input and related review points.
    Article map: Pin the project and define “done”; Build the scene with licensed placeholders; Create action-based input; Move the player through Rigidbody2D.

    2. Build the scene with licensed placeholders

    Create and save Assets/Scenes/Main.unity. Add a camera with an orthographic projection. Use simple coloured sprites created in the editor or original files for the player, border and goal. Record the source and licence of anything downloaded; “free” does not define reuse or redistribution rights.

    Create sorting layers for background, world and interface if needed. Use consistent world units. Add four static border objects with BoxCollider2D, and give the player:

    • SpriteRenderer;
    • Rigidbody2D with gravity scale set to zero for this top-down example; and
    • BoxCollider2D or another shape matching the visual body.

    Do not resize a collider accidentally through a deeply scaled parent. Turn on collision gizmos and check the actual shape. Place the goal with a BoxCollider2D marked as a trigger.

    3. Create action-based input

    Unity documents the Input System as the extensible alternative recommended for new projects, while the old UnityEngine.Input API is legacy (Unity — Input System, Unity — legacy Input API).

    Install or confirm the released Input System package compatible with the pinned editor. Create Assets/Input/GameInput.inputactions with an action map named Player and a Move action:

    • action type: Value;
    • control type: Vector2;
    • a 2D Vector composite for WASD;
    • a second 2D Vector composite for arrow keys; and
    • a gamepad left-stick binding.

    Save the asset. The package can bind multiple devices to one action and supports later rebinding through overrides (Unity — Input bindings). Input handling belongs to gameplay actions rather than keyboard-specific code.

    Decision path for Your First Unity 6 2D Game in Seven Testable Steps, covering Create action-based input, Move the player through Rigidbody2D, Add one goal and explicit game state and related review points.
    Decision path: Create action-based input; Move the player through Rigidbody2D; Add one goal and explicit game state; Add readable interface, audio and tests.

    4. Move the player through Rigidbody2D

    Create Assets/Scripts/TopDownMover.cs:

    using UnityEngine;
    using UnityEngine.InputSystem;
    
    [RequireComponent(typeof(Rigidbody2D))]
    public sealed class TopDownMover : MonoBehaviour
    {
        [SerializeField] private InputActionReference moveAction;
        [SerializeField, Min(0f)] private float speed = 5f;
    
        private Rigidbody2D body;
    
        private void Awake()
        {
            body = GetComponent<Rigidbody2D>();
        }
    
        private void OnEnable()
        {
            moveAction.action.Enable();
        }
    
        private void OnDisable()
        {
            moveAction.action.Disable();
            if (body != null)
            {
                body.linearVelocity = Vector2.zero;
            }
        }
    
        private void FixedUpdate()
        {
            Vector2 input = moveAction.action.ReadValue<Vector2>();
            if (input.sqrMagnitude > 1f)
            {
                input.Normalize();
            }
    
            body.linearVelocity = input * speed;
        }
    }

    Attach it to the player and assign the Move action reference. Unity 6's current Rigidbody2D API exposes linearVelocity as the linear velocity vector (Unity — Rigidbody2D.linearVelocity). Pinning the editor matters because older tutorials and versions use different API names.

    The script reads intent and applies velocity during the physics step. Normalising values above magnitude one prevents diagonal keyboard input from exceeding the configured speed. A platformer would need gravity, grounded checks, jump rules and a different controller; do not reuse this top-down movement unchanged.

    5. Add one goal and explicit game state

    Create a GoalZone component that raises one success event the first time the player enters. Keep outcome logic outside the movement script. A small GameFlow component can own Playing and Completed states, disable player input on completion and open a success panel.

    Validate the collider belongs to the player using a component or layer, not an object name. Guard repeated trigger callbacks so the score or success transition is idempotent. If the scene reloads, the new flow owner should start from a deliberate state.

    Add a reset control through an input action or accessible interface button. Do not require a mouse if gamepad is supported. Avoid relying only on colour or sound to communicate success.

    Control and evidence map for Your First Unity 6 2D Game in Seven Testable Steps, covering Add one goal and explicit game state, Add readable interface, audio and tests, Create a Build Profile and run the player and rela…
    Control and evidence map: Add one goal and explicit game state; Add readable interface, audio and tests; Create a Build Profile and run the player; General-information disclaimer.

    6. Add readable interface, audio and tests

    Create a Canvas with brief controls and a hidden success panel. Anchor elements so they survive several aspect ratios and safe areas. Use readable contrast and a logical navigation order. If a sound confirms success, keep the visible message as an alternative.

    Test the acceptance list in Play Mode, then add automated checks where useful:

    • an Edit Mode test for movement-vector normalisation;
    • a Play Mode test that the border blocks the body;
    • a Play Mode test that entering the goal completes once; and
    • a content check that the build scene is present.

    Try keyboard and a physical gamepad, unplug the gamepad, resize the window, lose and regain focus, and reload the scene. Watch the Console for exceptions and warnings. A tutorial that “looks right” but emits an error every frame is not complete.

    7. Create a Build Profile and run the player

    Open File → Build Profiles. Unity 6 Build Profiles let a project store multiple configurations and their scene lists as assets (Unity — Build Profiles). Create a development profile for the first target, add Main.unity, select the correct platform module and build to a clean local output directory.

    Run the built player and repeat the acceptance test. The editor does not reproduce every resolution, file path, input, graphics or lifecycle behaviour. For mobile, install on a physical device and check touch design, safe areas, suspend/resume, performance and package identity. Store submission additionally requires current signing, SDK, privacy and listing work; a local build is not store approval.

    Record the build date, source revision, editor and package versions and test device. Make a source-control tag when the seven-step sample passes. You now have a finished, reproducible base that can accept one new feature at a time.

    For a scoped software build or review, see Ozlin Info's secure web and software delivery service; related first-party game-engineering context is in the Projects archive, or contact Ozlin Info.

    Related reading: Cross-platform Unity architecture and delivery.


    Practical checklist for Your First Unity 6 2D Game in Seven Testable Steps, covering Create a Build Profile and run the player, General-information disclaimer, AI-assistance disclosure and related review points.
    Practical checklist: Create a Build Profile and run the player; General-information disclaimer; AI-assistance disclosure; Primary sources checked.

    General-information disclaimer

    This article provides an educational example, not a supported Unity package, storefront approval or production controller. Verify the pinned editor, packages, licences, platform requirements and tests for the actual project.

    AI-assistance disclosure

    AI tools assisted with source discovery, example drafting and copyediting. A human reviewer must create the project, compile the script, run the tests and verify current Unity and target-platform behaviour before relying on it in a project. The recorded editorial review is not evidence that these execution tests have passed.

    Primary sources checked

    Source access date: 29 August 2026.

    Limitations: This tutorial is an educational starting point; Unity, package, platform, signing and device behaviour must be tested with the actual project.