Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question Search for specific filetype with unity's search, (eg .exe, .ttf, .png, etc)

Discussion in 'Editor & General Support' started by FaffyWaffles, Oct 15, 2022.

  1. FaffyWaffles

    FaffyWaffles

    Joined:
    Apr 10, 2020
    Posts:
    45
    I'm doing a project that involves a lot of text and unicode, so I have several several different fonts scattered through out this project. I'm wanting to organize and trim the project, but I'm not sure how.

    is there something like t:Font or a search for a .ttf file?
     
  2. FaffyWaffles

    FaffyWaffles

    Joined:
    Apr 10, 2020
    Posts:
    45
    hmmmm, I found a solution but now im a bit annoyed.

    t:Font works

    All I did was restart unity.

    on gawd, I tried a million different permutations of t:Font

    welp

    ¯\_(ツ)_/¯


    Still, I'm curious about searching the filename extension
     
  3. sebastiengrenier

    sebastiengrenier

    Unity Technologies

    Joined:
    Jun 11, 2019
    Posts:
    96
    Hi!

    You have multiple ways to search for file types and file extensions. If you are using the Project Browser's search field, you can use
    t:ASSET_TYPE
    to search for assets of type "ASSET_TYPE", but you can also use
    glob:path
    to search for "path", which supports wildcards. So you could write
    glob:Assets/**/*.ttf
    to find any "ttf" files in any subfolders.

    Another way to search for files, types and other stuff is to use the Search Window (shortcut Ctrl-K by default). There is a filter token
    ext:
    to search by file extension. But with it you can search for more than what the basic Project Browser's search supports. There is more info here https://docs.unity3d.com/Manual/search-overview.html.

    Hope that helps.
     
    KyryloKuzyk likes this.
  4. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,159
    This search filter worked for me in Unity 2022.3.11:
    glob:"Assets/**/*.fbx"
    . And to search only for root files and exclude inner parts, I used this:
    t:model glob:"Assets/**/*.fbx"