Ejemplo n.º 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);
     });
 }
Ejemplo n.º 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);
     });
 }
Ejemplo n.º 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);
         }
     });
 }
Ejemplo n.º 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);
         }
     });
 }