docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SensorExtensions

    Helper methods to be shared by all classes that implement ISensor.

    Inheritance
    object
    SensorExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.MLAgents.Sensors
    Assembly: Unity.ML-Agents.dll
    Syntax
    public static class SensorExtensions

    Methods

    ObservationSize(ISensor)

    Get the total number of elements in the ISensor's observation (i.e. the product of the shape elements).

    Declaration
    public static int ObservationSize(this ISensor sensor)
    Parameters
    Type Name Description
    ISensor sensor
    Returns
    Type Description
    int
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)