// Use this for initialization void Start() { GlobalFlags.GetDragonFlag(out dragonData); if (dragonData != null) { GetComponent <SpriteRenderer>().sprite = dragonData.battleSprite; } }