That would be useful. When you select SO then change folder in Project view, there’s no way to get back to SO file in Project view while having it open only in Inspector.
I suggest that when clicked blue icon, the SO file gets selected in Project view. Alternatively some context menu “Find in Project” would suffice.

2 Likes
Can easily add this in a half dozen lines of code for yourself: Unity - Scripting API: MenuItem.MenuItem
1 Like
Exactly, I improve these little annoying things all the time with editor scripts. Need to create a bunch of connected assets at once? Editor script. Need to show those connected assets in the same Inspector? Custom Inspector. Need to quickly change the layout of a character in the scene? Editor Overlay.
Learning editor scripting is one of the things where you advance from beginner to intermediate.Albeit some tasks are excessively painful to learn, it‘s worthwhile to learn how to do them, and how to do them correctly. Pays off in the long term.
For this particular issue I would use a custom inspector. Draw a field (with VisualElement/UI Toolkit, not IMGUI!) that shows a reference to the asset followed by base.DrawInspector to draw the rest.
Thank you for directing me to the right answer, the resulting code is (put it anywhere)
using UnityEditor;
using UnityEngine;
[CustomEditor (typeof (ScriptableObject), true)]
public class CustomScriptableObjectInspector : Editor
{
// This method adds a custom option to the 3-dot menu next to the inspector
[MenuItem ("CONTEXT/ScriptableObject/Find in Project")]
private static void PrintCustomLog (MenuCommand command)
{
ScriptableObject scriptableObject = command.context as ScriptableObject;
if (scriptableObject != null)
{
// Focus the project window and select the ScriptableObject
string path = AssetDatabase.GetAssetPath (scriptableObject);
Object obj = AssetDatabase.LoadAssetAtPath<Object> (path);
if (obj != null)
{
EditorUtility.FocusProjectWindow ();
Selection.activeObject = obj;
}
}
else
{
Debug.LogWarning ("Impossible: no ScriptableObject selected.");
}
}
}
1 Like
It doesn’t need to be a custom editor. You can just have it in a static class.
1 Like