Download com.unity.ml-agents/Editor/Input/InputActuatorComponentEditor.cs from ashish2244/ppo-SnowballTarget: direct link, hf CLI and curl.
- Browser
- Download file 903 Bytes
-
https://huggingface.co/ashish2244/ppo-SnowballTarget/resolve/main/com.unity.ml-agents/Editor/Input/InputActuatorComponentEditor.cs
- Command line
-
hf download hf://ashish2244/ppo-SnowballTarget/com.unity.ml-agents/Editor/Input/InputActuatorComponentEditor.cs
-
curl -L -o InputActuatorComponentEditor.cs https://huggingface.co/ashish2244/ppo-SnowballTarget/resolve/main/com.unity.ml-agents/Editor/Input/InputActuatorComponentEditor.cs
903 Bytes
| using Unity.MLAgents.Input; | |
| using UnityEditor; | |
| namespace Unity.MLAgents.Editor.Input | |
| { | |
| [] | |
| [] | |
| internal class InputActuatorComponentEditor : UnityEditor.Editor | |
| { | |
| const string k_ActionSpecName = "m_ActionSpec"; | |
| public override void OnInspectorGUI() | |
| { | |
| var so = serializedObject; | |
| so.Update(); | |
| InputActuatorComponent o = so.targetObject as InputActuatorComponent; | |
| _ = o.ActionSpec; | |
| EditorGUI.indentLevel++; | |
| EditorGUI.BeginDisabledGroup(true); | |
| EditorGUILayout.PropertyField(so.FindProperty(k_ActionSpecName)); | |
| EditorGUI.EndDisabledGroup(); | |
| EditorGUI.indentLevel--; | |
| } | |
| } | |
| } | |