浏览代码

minor edits

/goal-conditioning/sensors-2
vincentpierre 4 年前
当前提交
f80f7651
共有 4 个文件被更改,包括 9 次插入5 次删除
  1. 7
      com.unity.ml-agents/Runtime/Sensors/CameraSensor.cs
  2. 2
      com.unity.ml-agents/Runtime/Sensors/CameraSensorComponent.cs
  3. 2
      com.unity.ml-agents/Runtime/Sensors/VectorSensor.cs
  4. 3
      com.unity.ml-agents/Runtime/Sensors/VectorSensorComponent.cs

7
com.unity.ml-agents/Runtime/Sensors/CameraSensor.cs


/// <param name="name">The name of the camera sensor.</param>
/// <param name="compression">The compression to apply to the generated image.</param>
public CameraSensor(
Camera camera, int width, int height, bool grayscale, string name, SensorCompressionType compression,
Camera camera,
int width,
int height,
bool grayscale,
string name,
SensorCompressionType compression,
ObservationType observationType = ObservationType.Default)
{
m_Camera = camera;

2
com.unity.ml-agents/Runtime/Sensors/CameraSensorComponent.cs


set { m_SensorName = value; }
}
[HideInInspector, SerializeField, FormerlySerializedAs("observationType")]
[HideInInspector, SerializeField]
ObservationType m_ObservationType;
[HideInInspector, SerializeField, FormerlySerializedAs("width")]

2
com.unity.ml-agents/Runtime/Sensors/VectorSensor.cs


/// </summary>
/// <param name="observationSize">Number of vector observations.</param>
/// <param name="name">Name of the sensor.</param>
public VectorSensor(int observationSize, ObservationType observationType = ObservationType.Default, string name = null)
public VectorSensor(int observationSize, string name = null, ObservationType observationType = ObservationType.Default)
{
if (name == null || name == "")
{

3
com.unity.ml-agents/Runtime/Sensors/VectorSensorComponent.cs


[AddComponentMenu("ML Agents/Vector Sensor", (int)MenuGroup.Sensors)]
public class VectorSensorComponent : SensorComponent
{
/// <summary>
/// Name of the generated <see cref="VectorSensor"/> object.
/// Note that changing this at runtime does not affect how the Agent sorts the sensors.

/// <returns></returns>
public override ISensor CreateSensor()
{
m_sensor = new VectorSensor(m_observationSize, m_ObservationType, m_SensorName);
m_sensor = new VectorSensor(m_observationSize, m_SensorName, m_ObservationType);
return m_sensor;
}

正在加载...
取消
保存