// Collect cat and mark that it has been collected public void markCatCollected(ObjectScript cat) { Transform t = Instantiate(catCollectedMarker).GetComponent <Transform>(); t.SetParent(UICanvas, false); t.localPosition = new Vector3(cat.transform.localPosition.x - 55f, -22.0f, cat.transform.localPosition.z); system.collectCat(cat.getCatLevel()); }