Class CameraSensorComponent
A SensorComponent that creates a CameraSensor.
Implements
Inherited Members
Namespace: Unity.MLAgents.Sensors
Assembly: solution.dll
Syntax
[AddComponentMenu("ML Agents/Camera Sensor", 50)]
public class CameraSensorComponent : SensorComponent, IDisposable
Properties
| Name | Description |
|---|---|
| Camera | Camera object that provides the data to the sensor. |
| CompressionType | The compression type to use for the sensor. |
| Grayscale | Whether to generate grayscale images or color. Note that changing this after the sensor is created has no effect. |
| Height | Height of the generated observation. Note that changing this after the sensor is created has no effect. |
| ObservationStacks | Whether to stack previous observations. Using 1 means no previous observations. Note that changing this after the sensor is created has no effect. |
| ObservationType | The type of the observation. |
| RuntimeCameraEnable | Controls the whether the camera sensor's attached camera is enabled during runtime. Overrides the camera object enabled status. Disabled for improved performance. Disabled by default. |
| SensorName | Name of the generated CameraSensor object. Note that changing this at runtime does not affect how the Agent sorts the sensors. |
| Width | Width of the generated observation. Note that changing this after the sensor is created has no effect. |
Methods
| Name | Description |
|---|---|
| CreateSensors() | Creates the CameraSensor |
| Dispose() | Clean up the sensor created by CreateSensors(). |