Class RenderTextureSensorComponent
Component that wraps a RenderTextureSensor.
Namespace: Unity.MLAgents.Sensors
Syntax
public class RenderTextureSensorComponent : SensorComponent, IDisposable
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 |
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 |
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
CreateSensors()
Create the ISensors. This is called by the Agent when it is initialized.
Declaration
public override ISensor[] CreateSensors()
Returns
Type | Description |
---|---|
ISensor[] | Created ISensor objects. |
Overrides
Dispose()
Clean up the sensor created by CreateSensors().
Declaration
public void Dispose()