// Use this for initialization void Start() { mClayResource = new Clay(); mClayResource.SetIcon(GetComponent <SpriteRenderer>().sprite); }