docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Sensors

    Sensors measure the environmental characteristics of the device that the application is running on. You can use the Sensor API to access information like a device's speed, orientation, or ambient temperature.

    Topic Description
    Sensors introduction Configure sensors to get information about environmental characteristics of devices.
    Query sensors in code Access information about the sensors connected to your application.
    Get the device location Read the geographic location of the device from the location sensor.
    Get the compass heading Read the direction that the device faces, relative to magnetic north or true north.
    Get the physical orientation of a device Detect whether the device is upright in portrait or landscape, or lying flat.
    Gyroscope bias and drift Understand gyroscope bias and drift, and choose which gyroscope device to use.
    Supported sensors reference Explore the sensor types the Input System can access.

    Additional resources

    • Devices
    • Use mobile device input in the Editor (Unity Remote)
    • Compensate orientation
    • Platform-specific settings
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)