Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

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:
    44
    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:
    44
    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:
    72
    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.