-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
641 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 37 additions & 5 deletions
42
RoR2EditorKit/Assets/RoR2EditorKit/Editor/Core/Inspectors/ExtendedInspector.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
RoR2EditorKit/Assets/RoR2EditorKit/Editor/Core/PropertyDrawers.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
...torKit/Assets/RoR2EditorKit/Editor/Core/PropertyDrawers/InspectorSettingPropertyDrawer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using RoR2EditorKit.Settings; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using UnityEditor; | ||
using UnityEngine; | ||
|
||
namespace RoR2EditorKit.Core.PropertyDrawers | ||
{ | ||
[CustomPropertyDrawer(typeof(RoR2EditorKitSettings.InspectorSetting))] | ||
public class InspectorSettingPropertyDrawer : PropertyDrawer | ||
{ | ||
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) | ||
{ | ||
EditorGUI.BeginProperty(position, label, property); | ||
|
||
var isEnabled = property.FindPropertyRelative("isEnabled"); | ||
var displayName = property.FindPropertyRelative("inspectorName"); | ||
|
||
EditorGUI.PropertyField(position, isEnabled, new GUIContent(ObjectNames.NicifyVariableName(displayName.stringValue))); | ||
|
||
EditorGUI.EndProperty(); | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...t/Assets/RoR2EditorKit/Editor/Core/PropertyDrawers/InspectorSettingPropertyDrawer.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.