I'm finding myself inputting some nasty bits of hard-coded sprite asset string references in my code like this:
[SerializeField] TMP_Text _purchaseLabel;
private void UpdateState()
{
_purchaseLabel.text = "<sprite name=\"coin\">" + _currency;
}
Naturally this Sprite Asset string could be used across many different areas in the game, and I could keep a bunch of constant that would maintain these references. I do wonder however if there's a smarter way about it, so if for example a Sprite Asset name changes, I wouldn't need to also update those constants in the code.
Thanks!