Skip to content

Commit 3f2f66e

Browse files
committed
- Add ability to copy value from other inspectors field/properties in "From Opened Inspectors" mode.
- Add "set to null" option in dropdown. - Open generic types now requires resolution before interacting with it. - Constructors (incl. static ones) now can be called when inspecting static members. - Reformatted code
1 parent 5744ecc commit 3f2f66e

14 files changed

+589
-522
lines changed

.editorconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ csharp_new_line_before_members_in_anonymous_types = true
1515
csharp_new_line_between_query_expression_clauses = true
1616
csharp_indent_case_contents = true
1717
csharp_indent_switch_labels = true
18-
csharp_indent_labels= no_change
18+
csharp_indent_labels = no_change
1919
csharp_space_after_cast = false
20-
csharp_space_after_keywords_in_control_flow_statements = false
20+
csharp_space_after_keywords_in_control_flow_statements = true
2121
csharp_space_between_method_declaration_parameter_list_parentheses = false
2222
csharp_space_between_method_call_parameter_list_parentheses = false
2323
csharp_space_before_colon_in_inheritance_clause = false

Editor/PlayerPrefsViewer.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using System.Linq;
66

77
namespace JLChnToZ.EditorExtensions.PlayerPrefsHelper {
8-
public class PlayerPrefsViewer : EditorWindow {
8+
public class PlayerPrefsViewer: EditorWindow {
99
[SerializeField] PrefEntry[] entries;
1010
[SerializeField] bool autoSave = true;
1111
[SerializeField] bool autoRefresh = true;
@@ -111,15 +111,16 @@ void OnInspectorUpdate() {
111111
if (autoRefresh) Repaint();
112112
}
113113
}
114-
115-
[Serializable] internal class PrefEntry : IEquatable<PrefEntry> {
114+
115+
[Serializable]
116+
internal class PrefEntry: IEquatable<PrefEntry> {
116117
[SerializeField] bool isEditor;
117118
[SerializeField] string key;
118119
[SerializeField] FieldType type;
119120
object value;
120121
[SerializeField] bool expanded;
121122
public Exception lastException;
122-
123+
123124
public string Key => key;
124125
public bool IsEditor => isEditor;
125126

@@ -271,7 +272,7 @@ public void Delete() {
271272
public override string ToString() => $"{key} = {value}";
272273
}
273274

274-
internal enum FieldType : byte {
275+
internal enum FieldType: byte {
275276
String = TypeCode.String,
276277
Integer = TypeCode.Int32,
277278
Float = TypeCode.Single,

Editor/SceneManagerWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ private void DrawElement(Rect rect, int index, bool isActive, bool isFocused) {
179179
} else if (EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo()) {
180180
playScene = true;
181181
var loadedScenes = new List<string>(EditorSceneManager.loadedSceneCount);
182-
for(int i = 0, c = EditorSceneManager.loadedSceneCount; i < c; i++) {
182+
for (int i = 0, c = EditorSceneManager.loadedSceneCount; i < c; i++) {
183183
Scene scene = SceneManager.GetSceneAt(i);
184184
if (scene.IsValid() && !string.IsNullOrEmpty(scene.path))
185185
loadedScenes.Add(scene.path);

Editor/SelectionEx.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ void OnGUI() {
108108
if (expanded && DrawSelection(kv.Key)) updateSelection = true;
109109
}
110110
EditorGUILayout.EndScrollView();
111-
if (DragAndDrop.objectReferences.Length > 0)
111+
if (DragAndDrop.objectReferences.Length > 0)
112112
switch (eType) {
113113
case EventType.DragUpdated:
114114
DragAndDrop.visualMode = DragAndDropVisualMode.Copy;
@@ -217,8 +217,8 @@ public int GetHashCode(UnityObject[] obj) {
217217
if (obj == null || obj.Length == 0) return 0;
218218
int hashCode = 0;
219219
foreach (var entry in obj) unchecked {
220-
if (entry != null) hashCode ^= entry.GetInstanceID();
221-
}
220+
if (entry != null) hashCode ^= entry.GetInstanceID();
221+
}
222222
return hashCode;
223223
}
224224

0 commit comments

Comments
 (0)