0
\$\begingroup\$

I have a folder full of images that I want to keep ready in a script. The Unity way to do this is to have a MonoBehaviour with, for example, a Sprite[] field, which I can populate in the editor.

Unfortunately, this also means that I have to sync my component manually with the folder's contents.

Essentially I'm looking for a way to "compile" this array at build time and avoid using the Resources folder approach, as I would like this to be loaded before the scene is started.

\$\endgroup\$
2
  • 2
    \$\begingroup\$ gamedev.stackexchange.com/questions/201164/… something like this? \$\endgroup\$
    – Zibelas
    Nov 17 at 7:07
  • \$\begingroup\$ @Zibelas OMG! Yes! I did not know that you can drag multiple assets onto an array like that. The editor script seems even nicer. \$\endgroup\$
    – AyCe
    Nov 17 at 20:51

0

You must log in to answer this question.

Browse other questions tagged .