Skip to content

Commit 0b2707e

Browse files
committed
All: Small cleanups
1 parent 67c7441 commit 0b2707e

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

Editor/ComponentPropertyCopy/ComponentPropertyCopy.cs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using UnityEngine;
22
using UnityEditor;
33
using System.Collections.Generic;
4-
using System.IO;
54
using UnityEditorInternal;
65
using System;
76
using System.Reflection;
@@ -78,32 +77,17 @@ void SetupProps()
7877
props.Props.Clear();
7978
Type type = src.GetType();
8079
if (Quirks.ContainsKey(type))
81-
{
8280
foreach (string key in Quirks[type].Keys)
83-
{
8481
props.Props.Add(new PropertyEntry(key));
85-
}
86-
}
8782

8883
propsScript.Props.Clear();
8984
foreach (PropertyInfo f in src.GetType().GetProperties())
90-
{
91-
SerializedObject s = new SerializedObject(src);
92-
SerializedProperty p = s.FindProperty(f.Name);
93-
9485
if (f.CanWrite && f.CanRead)
9586
propsScript.Props.Add(new PropertyEntry(f.Name));
96-
}
9787

9888
propsScriptFields.Props.Clear();
9989
foreach (FieldInfo f in src.GetType().GetFields())
100-
{
101-
SerializedObject s = new SerializedObject(src);
102-
SerializedProperty p = s.FindProperty(f.Name);
103-
104-
if (true)
105-
propsScriptFields.Props.Add(new PropertyEntry(f.Name));
106-
}
90+
propsScriptFields.Props.Add(new PropertyEntry(f.Name));
10791

10892
props.Visible = true;
10993
propsScript.Visible = true;

Editor/ShaderOccurenceWindow.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ void OnGUI()
4343
{
4444
GUILayout.Label(Path.GetFileNameWithoutExtension(materials[i]));
4545
GUILayout.FlexibleSpace();
46-
//if (GUILayout.Button("Show"))
47-
// EditorGUIUtility.PingObject(AssetDatabase.LoadAssetAtPath(materials[i], typeof(Material)));
46+
4847
if (GUILayout.Button("Select"))
4948
Selection.activeObject = AssetDatabase.LoadAssetAtPath(materials[i], typeof(Material));
5049
}

0 commit comments

Comments
 (0)