Truncated Filename in Project Window

File Names In the Project Window are Truncated.

In a Folder with a lot of iconless elements (a collection of scripts) this is very annyong - I want to be able to see the full file name. This can be either by viewing the files

  • in a list style (vertically aligned)

  • fontsize adjustable independently of the icon-size

  • text wrapping for the tile-view

  • tiles with a landscape format instead of square

Increasing the tilesize does dow NOT work:
2644592--186233--Screenshot (3).png
Even when its at the highest end, whats getting big is mostly the tiles/icons (which is a complete waste of UI-space that could be used by i.e. the scene viewer.)
The filename-string is still truncated a little less, but thats not enough.

I don’t really care how, but is it possible to just display the whole filename?

12 Likes

+1 Oh god please yes someone figure this out

4 Likes

+1, I need this. It’s really frustrating to have to click on every item to see the whole name or to use the colunm view.

1 Like

+1, how to fix this…

Another inconvenient is file names are truncated even when displaying “full” name. In our business we receive files containing periods inside and considered to have no extensions. Same with asset bundles which don’t have extensions. Currently there’s no way to view their names correctly in Unity. I use “show in explorer” to see the names. This is due to Unity omitting extensions.
Please Unity devs, revisit project view so it displays full names.

+1. It’s been somewhat problematic when you’re organizing similar items by its name at the end (ex. Player Weapon - Machine Gun Lv1, Lv2…, Player Weapon - Gatling Gun, etc) and also need to see the prefab image to easily locate your prefabs. I really wish there’s a way to view the entire file name when it’s not the list view.

+1 Unity needs to implement a feature for this

Well, I see i’m not the only one lol. Can’t wait to find a solution too.

The only solution that I’ve found so far is to open 2 project windows, one zoomed out max to see the full name, and the other one zoomed in to see the preview. When you click on one assets, it is highlighted in both windows. Hope it helps someone out there.

7936330--1014445--xxxxx.JPG

5 Likes

A bit like thomascrozelonpro says above, I found that by adding a new tab. Add Tab->Project from the 3-dot panels options top-right of the panel, I had a second tab-panel that automatically shows the project in filename mode. Then you can even close the old tab, and you have a simple file browser style project panel.

1 Like

i know this is an old post, but, again… is there a good solution for this? because i’m facing the same issue now and the only way to make it works is with this redundant workflow with 3 windows showing exactly the same, is a waste of space

It’s really unfathomable how such a simple-to-fix issue is still open after 7 years with so many LTS versions behind. At least give us an option to change the font size, or amount of lines…

1 Like

@WeaselOnaStick man, is like, unity editor is trolling you, this is the kind of problem you face back in 2005 or something like that, it feels mediocre IMHO… so much “technology” and you can not see the full name of your files on the project tab since 2016 (and before) lol

+1

I find an improvement on @thomascrozelonpro 's approach is to set the “description” project tab to use one-column layout, producing something like this:

Which takes up much less space whilst maintaining most of the advantages.

1 Like

its now 2023 and they still cant implement a list view lmao. Thanks for the giant icons

1 Like

But Unity has a list view, I think it always had. Just slide the slider all the way to the left.
9282073--1300537--Capture.PNG

1 Like

is not exactly useful when you need to see textures or 3d assets with long names

This is the way i use it, i open another project window with the two colum layer, but i hide the list view of that and i use the original project view on list mode to see the full name, when i select any file on either window is selected in the other, it was easy to get use to it
9282325--1300603--asda.png

2 Likes

I have written code to force the name display in the Project Window to be overridden. It be disabled on renaming and sub-assets. I think it’s pretty flawed, so please let me know if you can improve it.

I’m sure Unity developers could come up with a far smarter implementation in less than a few minutes if they wanted to…

using System;
using System.IO;
using System.Reflection;
using UnityEditor;
using UnityEngine;

[InitializeOnLoad]
public static class ProjectWindowShowFullAssetName {
    static GUIStyle style;
    static GUIContent assetGUIContent;
    static Color32 backgroundColor;
    static Color32 selectedFrameColor;
    static ProjectWindowShowFullAssetName() {
        EditorApplication.projectWindowItemInstanceOnGUI -= Draw;
        EditorApplication.projectWindowItemInstanceOnGUI += Draw;
        style = new GUIStyle {
            fontSize = 10,
            wordWrap = true,
            alignment = TextAnchor.UpperCenter,
            margin = new RectOffset(0,0,0,0),
        };
        assetGUIContent = new GUIContent();
        if (EditorGUIUtility.isProSkin) {
            backgroundColor = new Color32(51, 51, 51, 255);
            selectedFrameColor = new Color32(44, 93, 135, 255);
        } else {
            backgroundColor = new Color32(190, 190, 190, 255);
            selectedFrameColor = new Color32(58, 114, 176, 255);
        }
    }

    static int lastFrameCount;
    static bool isRenaming;
    static void Draw(int instanceID, Rect selectionrect ) {
        if (lastFrameCount != Time.frameCount) {
            isRenaming = IsRenaming();
            lastFrameCount = Time.frameCount;
        }
        if (isRenaming) return;
        if (selectionrect.height <= 20) return;
        if (AssetDatabase.IsSubAsset(instanceID)) return;

       
        var path = AssetDatabase.GetAssetPath(instanceID);
        if (string.IsNullOrWhiteSpace(path)) return;

        var assetName = Path.GetFileNameWithoutExtension(path);
        var icon = AssetDatabase.GetCachedIcon(path);

        var nameRect = new Rect(selectionrect.x, selectionrect.yMax - 12, selectionrect.width, 12);

        bool selected = false;
        assetGUIContent.text = assetName;

        foreach (var assetguid in Selection.instanceIDs) {
            if (assetguid == instanceID) {
                selected = true;
                break;
            }
        }
        if (EditorGUIUtility.isProSkin) {
            style.normal.textColor = Color.white;
        } else {
            style.normal.textColor = selected ? Color.white : Color.black;
        }
        var selectedFrameRect = new Rect(nameRect.x - 6, nameRect.y - 1, nameRect.width + 12, style.CalcHeight(assetGUIContent, nameRect.width) + 3);

        EditorGUI.DrawRect(selectedFrameRect, selected ? selectedFrameColor : backgroundColor);
        EditorGUI.DrawRect(new Rect(selectedFrameRect.xMax - 1, selectedFrameRect.y, 1, selectedFrameRect.height), backgroundColor);
        GUI.Label(nameRect, assetName, style);

        if (icon) {
            var iconRect = new Rect(nameRect.x, nameRect.y - 15, 14, 14);
            EditorGUI.DrawRect(iconRect, new Color(0, 0, 0, 0.5f));
            GUI.DrawTexture(iconRect, icon);
        }
    }

    static private Assembly asm;
    static private EditorWindow projectBrowserWindow;
    static private Type typeProjectBrowser;
    static bool IsRenaming() {
        if (asm == null) asm = Assembly.Load("UnityEditor.dll");
        var flag = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance;
        if(typeProjectBrowser == null) typeProjectBrowser = asm.GetType("UnityEditor.ProjectBrowser");
        if(projectBrowserWindow == null) projectBrowserWindow = EditorWindow.GetWindow(typeProjectBrowser,false,null,false);
        var m_ListAreaState = projectBrowserWindow.GetType().GetField("m_ListAreaState", flag).GetValue(projectBrowserWindow);
        var m_RenameOverlay = m_ListAreaState.GetType().GetField("m_RenameOverlay", flag).GetValue(m_ListAreaState);
        return (bool)m_RenameOverlay.GetType().GetField("m_IsRenaming", flag).GetValue(m_RenameOverlay);
    }
}

3 Likes

Well done! Does it have to be put in a specific folder?