I've been trying to find the best way to list currently used textures in a given scene, and the amount of memory they consume (profiler not providing a breakdown of texture memory). Also wanted to see where active textures are being used, by which GameObjects, which materials and the number of materials/meshes currently used in the scene.
I couldn't find a workflow that best suits this, so knocked up a quick Editor extension that might help if you are looking to do something similar. You can download from here:
Newish to Unity so there might be a really obvious way of doing this already that I'm not aware of. Anyway, its public domain, so do whatever you like with it, hope its of use to some of you
Resource checker is designed to help bring visibility to resource use in your scenes (ie what assets are using up memory,
which meshes are a bit too detailed, where are my materials and textures being used).
It should also be useful to check for redundant materials, textures you forget you're using, textures that can be compressed or reduced in size.
To use, just create an "Editor" folder within "Assets" in your project if you don't already have one, and drop ResourceChecker.cs in there.
In Unity you'll see a new option under "Window" -> "Resource Checker"
To use, once the window is open, just click 'Refresh' and it will list all active textures, materials and meshes in the scene
- Textures are listed in descending memory size
- Click the texture name to open the asset in the project window
- The size of the texture, compression type and dimensions are show
- Click the 'X Mat' button to select all materials that use this texture in the scene
- Click the 'X GO' to select all game objects in the scene that use this texture
- Click the material name to open the material asset in the project window
- Click the 'X GO' to select all game objects in the scene that use this material
- Meshes are listed in descending vertex count
- Click the mesh name to open the mesh in the project window
- Click the 'X GO' to select all game objects in the scene that use this mesh
Its probably got a bunch of bugs and weird issues - feel free to help improve, fix up!