Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Assets/Editor Default Resources/Icons.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 23 additions & 2 deletions Assets/ProjectWindowDetail/ProjectWindowDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ private static void DrawAssetDetails(string guid, Rect rect)
{
return;
}

var windowWidth = rect.width;

if (Event.current.type == EventType.MouseDown &&
Event.current.button == 0 &&
Expand Down Expand Up @@ -104,6 +106,26 @@ private static void DrawAssetDetails(string guid, Rect rect)
// this entry could be Favourites or Packages. Ignore it.
return;
}

var allDetailsLength = 0f;
for (var i = _details.Count - 1; i >= 0; i--)
{
var detail = _details[i];
if (!detail.Visible)
{
continue;
}

allDetailsLength += detail.ColumnWidth;
}

var assetLength = 30 + MenuIconWidth + asset.name.Length * 2.2f + _details.Count * SpaceBetweenColumns;
var maxDetailSpace = windowWidth - assetLength;
if (allDetailsLength > maxDetailSpace)
{
return;
}


for (var i = _details.Count - 1; i >= 0; i--)
{
Expand All @@ -122,8 +144,7 @@ private static void DrawAssetDetails(string guid, Rect rect)

private static void DrawMenuIcon(Rect rect)
{
rect.y += 4;
var icon = EditorGUIUtility.IconContent("d_LookDevPaneOption");
var icon = EditorGUIUtility.IconContent("T_Project_Window_Detail_Icon");
EditorGUI.LabelField(rect, icon);
}

Expand Down