Example #1
0
 public void DrawInInspector(SerializedProperty property)
 {
     InspectorUtils.DrawObject(property, () => {
         EditorGUILayout.PropertyField(property.FindPropertyRelative("ButtonType"), false);
         EditorGUILayout.PropertyField(property.FindPropertyRelative(ButtonType == ButtonType.Mouse ? "MouseButton" : "KeyboardButton"), false);
     });
 }
Example #2
0
 public void DrawInInspector(SerializedProperty property)
 {
     InspectorUtils.DrawObject(property, () => {
         EditorGUILayout.PropertyField(property.FindPropertyRelative("ReverseAxisDirection"), false);
         InspectorUtils.DrawField(GetType().GetField("PositiveButton"), property.FindPropertyRelative("PositiveButton"), this);
         InspectorUtils.DrawField(GetType().GetField("NegativeButton"), property.FindPropertyRelative("NegativeButton"), this);
     });
 }
Example #3
0
 public void DrawInInspector(SerializedProperty property)
 {
     InspectorUtils.DrawObject(property, () => {
         foreach (var field in GetType().GetFields())
         {
             var fieldProperty = property.FindPropertyRelative(field.Name);
             InspectorUtils.DrawField(field, fieldProperty, this);
         }
     });
 }
Example #4
0
 public void DrawInInspector(SerializedProperty property)
 {
     InspectorUtils.DrawObject(property, () => {
         EditorGUILayout.PropertyField(property.FindPropertyRelative("IsButtonActivated"), false);
         if (typeof(CursorInput).IsAssignableFrom(GetType()))
         {
             EditorGUILayout.PropertyField(property.FindPropertyRelative("MainAxisOnly"), false);
         }
         if (typeof(FlystickInput).IsAssignableFrom(GetType()))
         {
             EditorGUILayout.PropertyField(property.FindPropertyRelative("Instance"), false);
         }
         if (IsButtonActivated && typeof(PointerInput).IsAssignableFrom(GetType()))
         {
             EditorGUILayout.PropertyField(property.FindPropertyRelative("ActivationType"), false);
         }
         if (IsButtonActivated)
         {
             var buttonProperty = property.FindPropertyRelative("Button");
             InspectorUtils.DrawField(GetType().GetField("Button"), buttonProperty, this);
         }
     });
 }