1
\$\begingroup\$

So, if you had something like:

public sprite;

in a monobehavior, and that was dragged onto a gameobject, in the editor you will have the option to click the variable and select a sprite to use.

For me, I have many many pictures that I can choose from, and it takes me a while to select the correct image that I need to use.

Is there any way to categorize pictures, and only show pictures from that category? For instance, can I add some kind of tag or something to the picture assets something like "UI", so then when the developers that use my scripts go to select an image, they are not bombarded with every possible image in the game, but instead something contextual that makes sense?

I am wondering if this functionality exists already or any other way to achieve similar results.

Thanks for your time!

\$\endgroup\$
3
  • 1
    \$\begingroup\$ @JohnHamilton: I would argue that using naming and search filters qualifies as "a way of limiting the sprites you can select" and a "way to categorize pictures, and only show pictures from that category" so I think this is worth sharing as an answer. (Including a screengrab of the asset selector with such a search active would help illustrate how effective this is) This method has the big advantage that it introduces no new overhead into the system, and devs don't have to learn a new custom workflow for this case. \$\endgroup\$
    – DMGregory
    Jun 14 '17 at 12:00
  • 1
    \$\begingroup\$ @DMGregory I've turned my comment into an answer and removed the relevant comment. \$\endgroup\$ Jun 14 '17 at 16:40
  • 1
    \$\begingroup\$ Thank you both for your input. I think naming convention could help a lot using the already existing search. I will think about that a bit more, and that might be the best way to go about it. Thank you both. If I don't get any other answers, then i'll mark that methodology as the best. \$\endgroup\$ Jun 14 '17 at 19:08
1
\$\begingroup\$

We, as a team, have a working system. We use good names (not really great since you can see UI-btn and UI-Button as names) and we filter out all the other sprites this way. When I want anything that is related to UI, I type in UI- and voila! If I want UI buttons, I type in UI-btn- and voila! It's pretty good on it's own, you just need to use it.

enter image description here

Also, as a file & folder structure, I suggest you keep everything that are of one kind in one folder, and separate it further inside that folder. If I'm not sure which folder a material should go, it usually keeps sitting in the Assets folder until I can decide (which doesn't take that long). See examples below:

enter image description hereenter image description here

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.