Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions UnitySDK/Assets/ML-Agents/Scripts/Constants.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace MLAgents
{
/// <summary>
/// Grouping for use in AddComponentMenu (instead of nesting the menus).
/// </summary>
public enum MenuGroup
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better way to do this / better place to put it?

{
Default=0,
Sensors=50
}
}
3 changes: 3 additions & 0 deletions UnitySDK/Assets/ML-Agents/Scripts/Constants.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions UnitySDK/Assets/ML-Agents/Scripts/DemonstrationRecorder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace MLAgents
/// Demonstration Recorder Component.
/// </summary>
[RequireComponent(typeof(Agent))]
[AddComponentMenu("ML Agents/Demonstration Recorder", (int) MenuGroup.Default)]
public class DemonstrationRecorder : MonoBehaviour
{
public bool record;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ namespace MLAgents
/// <summary>
/// The Factory to generate policies.
/// </summary>
///
[AddComponentMenu("ML Agents/Behavior Parameters", (int) MenuGroup.Default)]
public class BehaviorParameters : MonoBehaviour
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace MLAgents.Sensor
{
[AddComponentMenu("ML Agents/Camera Sensor", (int) MenuGroup.Sensors)]
public class CameraSensorComponent : SensorComponent
{
public new Camera camera;
Expand Down
1 change: 0 additions & 1 deletion UnitySDK/Assets/ML-Agents/Scripts/Sensor/ISensor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,4 @@ public static int ObservationSize(this ISensor sensor)
return count;
}
}

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
using UnityEngine;

namespace MLAgents.Sensor
{
[AddComponentMenu("ML Agents/Ray Perception Sensor 2D", (int) MenuGroup.Sensors)]
public class RayPerceptionSensorComponent2D : RayPerceptionSensorComponentBase
{
public override RayPerceptionSensor.CastType GetCastType()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace MLAgents.Sensor
{
[AddComponentMenu("ML Agents/Ray Perception Sensor 3D", (int) MenuGroup.Sensors)]
public class RayPerceptionSensorComponent3D : RayPerceptionSensorComponentBase
{
[Header("3D Properties", order = 100)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace MLAgents.Sensor
{
[AddComponentMenu("ML Agents/Render Texture Sensor", (int) MenuGroup.Sensors)]
public class RenderTextureSensorComponent : SensorComponent
{
public RenderTexture renderTexture;
Expand Down