// Retrieves a dot from the pool, with a random type public DotController GetNewDot() { GameObject dotObject = dotPool.GetFromPool(); DotController dot = dotObject.GetComponent <DotController>(); DotType dotType = dotTypes[Random.Range(0, dotTypes.Count)]; dot.SetDotType(dotType); return(dot); }