Being able to quickly find what you need in engine is very useful. There are a bunch of tips out there for helping with this but advanced content browser searching is one that I don’t see many people talking about and the subject that I wanted to write about today.
Did you know you can use operator logic and certain syntax to do advanced searches in the content browser?
If you would prefer to watch the video version, check it out here
I’m going to walk through a bunch of practical examples to show you some of the different more advanced search behaviours we can achieve. For all of these, I have the root content folder selected, so I can search assets across my entire project.
First up I’m sure you know if you type in a word it will bring up a list of content that contains that word. Below I am searching for Voice and it is bringing up everything that contains the word anywhere in the assets name.
We can do the opposite and search for everything that is NOT voice by using the exclamation mark and then the word e.g. !voice
Next up we can get more specific in our searches by combining multiple keywords by using the &. So in the example below we are searching for voice & player
We can also combine searches using OR which is done through the | key (the vertical line, achieved through shift and the key next to your left shift). So in the case below player | zomb
We can do multiple combinations of the above, for example below we are looking for anything that is a hit but we want to exclude the player based assets from those searches. We do this with hit & !player
Normally if you search for a word, it doesn’t matter where in the assets name it appears. For example in the previous image we looked for hit and in the search result Mat_White showed up because white technically has the word hit in it. However, there is search syntax we can use to get around this, by looking for a specific prefix and suffix. For the prefix search, we can use the word we want to search followed by three full stops e.g. hit…
Similar to that we can search for a suffix by using three full stops and then word we want to search for. In the example below I want to find anything that ends in a 1 so I searched for …1
What we have talked about so far are the more generic searches. We can actually go more advanced and search using specific metadata types. If we hover over an asset in the content browser we see a bunch of information in the popup. The darker grey text Vertices, Materials, Triangles etc are tags that we can use in our more advanced searching.
Here is where things start to get interesting, we can use this information for example to look for any asset that has less than X amount of triangles. In our image below we are looking for any asset that has less than 10 triangles with triangles < 10 . You can see we only have 2 assets that fulfil these criteria in the entire project. You can change the number at the end to be 100, 500 etc you can also change it to greater than triangles > X amount, which could be good for catching any assets that slipped into the project that have too great a tri count.
We can also look for an asset type specifically. In the example below I am looking for assets of type static mesh. An interesting thing to note here is that as you type Unreal will show you a list of “Types”, trying to predict what you are after. You can click on the entry in this list to quick fill what you are looking for.
Next up I want to give you a couple of examples of ways in which this advance searching can be used in a proactive way for your project. Firstly we can check the collision of all our assets. In the example below I am using CollisionPrims <=0 . Basically, I am only showing assets that do not have any collision. This is a great check to do because it can allow us to catch potential problems. For example, we may see that a wall or a floor tile that should have collision is in this list of assets without collision.
You can also use this advanced searching to help with optimising your project. Below we are using UVChannels > 2 . We are looking for any assets that are using more than 2 UV channels. Generally, 2 is a good number, the first for texturing and the second used as a lightmap, extra channels take up a slight bit more memory, so if we don’t need them ditching them will help keep things optimised. As we can see three objects come up. I would then go through each and see if they actually need the extra channels or if we could get rid of them and have a more optimised project!
There are so many different ways you can use this advance content browser searching to your advantage. From simply helping to quickly find assets, to help catch problems, to aiding finding assets that could be optimised in your project!
If you want more quick tips & tricks FOLLOW ME ON TWITTER @cbGameDev
Also, check out the parkour game I'm solo developing called Freerunners. Give it a wishlist if you like the way it looks!: https://store.steampowered.com/app/1430330/Freerunners/