public void Setup(Camera camera, GameManager gamemanager, Collider[] holecollider) { // Get ref to GameManager m_Manager = gamemanager; // Set script used to push ball m_Movement = m_Instance.GetComponent <BallMovement>(); m_Movement.SetCamera(camera); m_Movement.SetPower(m_ChargeTime, m_Force); m_Movement.SetHole(m_Hole); m_Movement.SetCollider(holecollider); m_Movement.SetManager(this); // Set slider uislider = m_Instance.GetComponentInChildren <UISliderControl>(); uislider.SetCamera(camera); uislider.SetRigidbody(m_Instance.GetComponent <Rigidbody>()); }