docs.unity.cn
    Show / Hide Table of Contents

    Class CameraSensorComponent

    A SensorComponent that creates a CameraSensor.

    Inheritance
    Object
    SensorComponent
    CameraSensorComponent
    Namespace: Unity.MLAgents.Sensors
    Syntax
    public class CameraSensorComponent : SensorComponent, IDisposable

    Properties

    Camera

    Camera object that provides the data to the sensor.

    Declaration
    public Camera Camera { get; set; }
    Property Value
    Type Description
    Camera

    CompressionType

    The compression type to use for the sensor.

    Declaration
    public SensorCompressionType CompressionType { get; set; }
    Property Value
    Type Description
    SensorCompressionType

    Grayscale

    Whether to generate grayscale images or color. Note that changing this after the sensor is created has no effect.

    Declaration
    public bool Grayscale { get; set; }
    Property Value
    Type Description
    Boolean

    Height

    Height of the generated observation. Note that changing this after the sensor is created has no effect.

    Declaration
    public int Height { get; set; }
    Property Value
    Type Description
    Int32

    ObservationStacks

    Whether to stack previous observations. Using 1 means no previous observations. Note that changing this after the sensor is created has no effect.

    Declaration
    public int ObservationStacks { get; set; }
    Property Value
    Type Description
    Int32

    ObservationType

    The type of the observation.

    Declaration
    public ObservationType ObservationType { get; set; }
    Property Value
    Type Description
    ObservationType

    SensorName

    Name of the generated CameraSensor object. Note that changing this at runtime does not affect how the Agent sorts the sensors.

    Declaration
    public string SensorName { get; set; }
    Property Value
    Type Description
    String

    Width

    Width of the generated observation. Note that changing this after the sensor is created has no effect.

    Declaration
    public int Width { get; set; }
    Property Value
    Type Description
    Int32

    Methods

    CreateSensors()

    Creates the CameraSensor

    Declaration
    public override ISensor[] CreateSensors()
    Returns
    Type Description
    ISensor[]

    The created CameraSensor object for this component.

    Overrides
    SensorComponent.CreateSensors()

    Dispose()

    Clean up the sensor created by CreateSensors().

    Declaration
    public void Dispose()
    Back to top Copyright © 2021 Unity Technologies
    Generated by DocFX
    on Monday, November 8, 2021
    Terms of use