{
assetSearchFolders = new string[1];
assetSearchFolders[0] = "Assets/ScriptableObjects";
FindAllSOs();
}
void OnFocus()
[MenuItem("Tools/Quick Access Tool")]
[MenuItem("Tools/SOs Quick Access Tool")]
GetWindow<SOsQuickAccessToolWindow>("Quick Access Tool");
GetWindow<SOsQuickAccessToolWindow>("SOs Quick Access Tool");
// All finding work #1
GUILayout.Space(EditorGUIUtility.singleLineHeight);
if (GUILayout.Button("Refresh All"))
FindDisplaySOs();
GUILayout.Label("Please select a Scriptable Object Type To Search For");
DrawSOsPicker();
GUILayout.Space(EditorGUIUtility.singleLineHeight * 3f);
DrawSOsList();
void DrawSOsPicker()
EditorGUI.BeginChangeCheck();
selected = EditorGUILayout.Popup("Scriptable Object Types", selected, SOTypes.ToArray());
if (EditorGUI.EndChangeCheck())
void DrawSOsList()
scroll = GUILayout.BeginScrollView(scroll);
for (int i=0; i< displayObjectsGUIDs.Length; i++)
GUILayout.Label(i+1 + ". " + displayObjects[i].name);
if (GUILayout.Button("Locate Quickly"))
EditorUtility.FocusProjectWindow();
EditorGUIUtility.PingObject(displayObjects[i]);
GUILayout.EndScrollView();
void FindAllSOs()
objectsGUIDs = AssetDatabase.FindAssets("t:ScriptableObject", assetSearchFolders) as string[];
objectsPaths = new string[objectsGUIDs.Length];
SOTypes.Add(objects[i].GetType().ToString());
// End #1
GUILayout.Space(EditorGUIUtility.singleLineHeight * 2f);
GUILayout.Label("Please select a Scriptable Object Type To Search For...");
void FindDisplaySOs()
if (displayObjects != null)
displayObjectsPaths.Add(AssetDatabase.GUIDToAssetPath(displayObjectsGUIDs[i]));
displayObjects.Add(AssetDatabase.LoadAssetAtPath(displayObjectsPaths[i], typeof(ScriptableObject)) as ScriptableObject);
if (GUILayout.Button("Locate"))