docs.unity3d.com
    Show / Hide Table of Contents

    Class RenderTextureSensorComponent

    Component that wraps a RenderTextureSensor.

    Inheritance
    Object
    SensorComponent
    RenderTextureSensorComponent
    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
    SensorComponent.CreateSensors()

    Dispose()

    Clean up the sensor created by CreateSensors().

    Declaration
    public void Dispose()
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023