using UnityEngine; public class CharacterSelectionButtonScript : MonoBehaviour { public GameObject characterSelectionManager; public string button; // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() { Debug.Log(characterSelectionManager); Debug.Log(characterSelectionManager.GetComponent()); } void OnMouseDown() { if (button == "right") { Debug.Log(button); characterSelectionManager.GetComponent().CycleRight(); } if (button == "left") { Debug.Log(button); characterSelectionManager.GetComponent().CycleLeft(); } } }