浏览代码

docstring

/develop/grid-rootref-debug
Ruo-Ping Dong 4 年前
当前提交
3ed0a593
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 2
      com.unity.ml-agents/Editor/GridSensorComponentEditor.cs
  2. 3
      com.unity.ml-agents/Runtime/Sensors/GridSensorComponent.cs

2
com.unity.ml-agents/Editor/GridSensorComponentEditor.cs


var gridSize2d = new Vector3Int(gridSize.vector3IntValue.x, 1, gridSize.vector3IntValue.z);
var newGridSize = EditorGUILayout.Vector3IntField("Grid Size", gridSize2d);
gridSize.vector3IntValue = new Vector3Int(newGridSize.x, 1, newGridSize.z);
EditorGUILayout.PropertyField(so.FindProperty(nameof(GridSensorComponent.m_RootReference)), true);
EditorGUILayout.PropertyField(so.FindProperty(nameof(GridSensorComponent.m_RootReference)), true);
EditorGUILayout.PropertyField(so.FindProperty(nameof(GridSensorComponent.m_RotateWithAgent)), true);
EditorGUI.BeginDisabledGroup(!EditorUtilities.CanUpdateModelProperties());

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


[HideInInspector, SerializeField]
internal GameObject m_RootReference;
/// <summary>
/// Rotate the grid based on the direction the agent is facing.
/// The reference of the root of the agent. This is used to disambiguate objects with
/// the same tag as the agent. Defaults to current GameObject.
/// </summary>
public GameObject RootReference
{

正在加载...
取消
保存