Class RenderTextureSensorComponent
Component that wraps a RenderTextureSensor.
Namespace: Unity.MLAgents.Sensors
Syntax
public class RenderTextureSensorComponent : SensorComponent
Properties
CompressionType
Compression type for the render texture observation.
Declaration
public SensorCompressionType CompressionType { get; set; }
Property Value
Type | Description |
---|---|
SensorCompressionType |
Grayscale
Whether the RenderTexture observation should be converted to grayscale or not. Note that changing this after the sensor is created has no effect.
Declaration
public bool Grayscale { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
RenderTexture
Stores the RenderTexture associated with this sensor.
Declaration
public RenderTexture RenderTexture { get; set; }
Property Value
Type | Description |
---|---|
RenderTexture |
SensorName
Name of the generated RenderTextureSensor. 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 |
Methods
CreateSensor()
Create the ISensor. This is called by the Agent when it is initialized.
Declaration
public override ISensor CreateSensor()
Returns
Type | Description |
---|---|
ISensor | Created ISensor object. |
Overrides
GetObservationShape()
Returns the shape of the sensor observations that will be created.
Declaration
public override int[] GetObservationShape()
Returns
Type | Description |
---|---|
Int32[] | Shape of the sensor observation. |