docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method RegisterSensor

    RegisterSensor(EgoHandle, string, string, float, CaptureTriggerMode, float, int, bool)

    Register a new sensor under the given ego.

    Declaration
    public static SensorHandle RegisterSensor(EgoHandle egoHandle, string modality, string description, float firstCaptureFrame, CaptureTriggerMode captureTriggerMode, float simulationDeltaTime, int framesBetweenCaptures, bool manualSensorAffectSimulationTiming = false)
    Parameters
    Type Name Description
    EgoHandle egoHandle

    The ego container for the sensor. Sensor orientation will be reported in the context of the given ego.

    string modality

    The kind of the sensor (ex. "camera", "lidar")

    string description

    A human-readable description of the sensor (ex. "front-left rgb camera")

    float firstCaptureFrame

    The offset from the current frame on which this sensor should first be scheduled.

    CaptureTriggerMode captureTriggerMode

    The method of triggering captures for this sensor.

    float simulationDeltaTime

    The simulation frame time (seconds) requested by this sensor.

    int framesBetweenCaptures

    The number of frames to simulate and render between the camera's scheduled captures. Setting this to 0 makes the camera capture every frame.

    bool manualSensorAffectSimulationTiming

    Have this unscheduled (manual capture) camera affect simulation timings (similar to a scheduled camera) by requesting a specific frame delta time

    Returns
    Type Description
    SensorHandle

    A SensorHandle, which should be used to check ShouldCaptureThisFrame each frame to determine whether to capture (or render) that frame. It is also used to report captures, annotations, and metrics on the sensor.

    Exceptions
    Type Condition
    ArgumentException

    Thrown if ego is invalid.

    In This Article
    Back to top
    Copyright © 2024 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)