0
\$\begingroup\$

In Unity's editor I have set a swatch with some colours that are used throughout our game:

The colour picker, with an added swatch of colours

This swatch is saved in a file in the project's Assets folder:

\ProjectFolder\Assets\Editor\Main Colors.colors

I would like to use the colours in this swatch somewhere in a script:

GetComponent<Graphic>().color = SomethingHere.MainRed;

What is the best way to do this? Or is it not possible?

New contributor
Bassie-c is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
\$\endgroup\$

Your Answer

Bassie-c is a new contributor. Be nice, and check out our Code of Conduct.

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.