Download com.unity.ml-agents/Editor/AgentEditor.cs from ashish2244/ppo-SnowballTarget: direct link, hf CLI and curl.
- Browser
- Download file 865 Bytes
-
https://huggingface.co/ashish2244/ppo-SnowballTarget/resolve/main/com.unity.ml-agents/Editor/AgentEditor.cs
- Command line
-
hf download hf://ashish2244/ppo-SnowballTarget/com.unity.ml-agents/Editor/AgentEditor.cs
-
curl -L -o AgentEditor.cs https://huggingface.co/ashish2244/ppo-SnowballTarget/resolve/main/com.unity.ml-agents/Editor/AgentEditor.cs
865 Bytes
| using UnityEngine; | |
| using UnityEditor; | |
| namespace Unity.MLAgents.Editor | |
| { | |
| /* | |
| This code is meant to modify the behavior of the inspector on Agent Components. | |
| */ | |
| [] | |
| [] | |
| internal class AgentEditor : UnityEditor.Editor | |
| { | |
| public override void OnInspectorGUI() | |
| { | |
| var serializedAgent = serializedObject; | |
| serializedAgent.Update(); | |
| var maxSteps = serializedAgent.FindProperty("MaxStep"); | |
| EditorGUILayout.PropertyField( | |
| maxSteps, | |
| new GUIContent("Max Step", "The per-agent maximum number of steps.") | |
| ); | |
| serializedAgent.ApplyModifiedProperties(); | |
| EditorGUILayout.LabelField("", GUI.skin.horizontalSlider); | |
| base.OnInspectorGUI(); | |
| } | |
| } | |
| } | |