浏览代码

Removing VectorSensor UpdateSensor method

/goal-conditioning/sensors-2
vincentpierre 4 年前
当前提交
22c51ec6
共有 3 个文件被更改,包括 0 次插入26 次删除
  1. 13
      com.unity.ml-agents/Editor/VectorSensorComponentEditor.cs
  2. 1
      com.unity.ml-agents/Runtime/Sensors/CameraSensorComponent.cs
  3. 12
      com.unity.ml-agents/Runtime/Sensors/VectorSensorComponent.cs

13
com.unity.ml-agents/Editor/VectorSensorComponentEditor.cs


so.Update();
// Drawing the VectorSensorComponent
EditorGUI.BeginChangeCheck();
EditorGUI.BeginDisabledGroup(!EditorUtilities.CanUpdateModelProperties());
{

}
EditorGUI.EndDisabledGroup();
var requireSensorUpdate = EditorGUI.EndChangeCheck();
if (requireSensorUpdate)
{
UpdateSensor();
}
}
void UpdateSensor()
{
var sensorComponent = serializedObject.targetObject as VectorSensorComponent;
sensorComponent?.UpdateSensor();
}
}
}

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


{
m_Sensor.Camera = m_Camera;
m_Sensor.CompressionType = m_Compression;
m_Sensor.ObservationType = m_ObservationType;
}
}
}

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


{
return m_sensor;
}
/// <summary>
/// Update fields that are safe to change on the Sensor at runtime.
/// </summary>
internal void UpdateSensor()
{
if (m_sensor != null)
{
}
}
}
}
正在加载...
取消
保存