using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class setactive_ : MonoBehaviour { public GameObject showC; public GameObject showJava; public GameObject showPython; public GameObject ScrollbarC; public GameObject ScrollbarJava; public GameObject ScrollbarPython; public GameObject buttonC; public GameObject buttonJava; public GameObject buttonPython; public Sprite SlecetC; public Sprite SlecetJava; public Sprite SlecetPython; public Sprite UnSlecetC; public Sprite UnSlecetJava; public Sprite UnSlecetPython; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { } public void buttonCFunction() { showC.SetActive(true); showJava.SetActive(false); showPython.SetActive(false); ScrollbarC.SetActive(true); ScrollbarJava.SetActive(false); ScrollbarPython.SetActive(false); buttonC.GetComponent().sprite = SlecetC; buttonJava.GetComponent().sprite = UnSlecetJava; buttonPython.GetComponent().sprite = UnSlecetPython; } public void buttonJavaFunction() { showC.SetActive(false); showJava.SetActive(true); showPython.SetActive(false); ScrollbarC.SetActive(false); ScrollbarJava.SetActive(true); ScrollbarPython.SetActive(false); buttonC.GetComponent().sprite = UnSlecetC; buttonJava.GetComponent().sprite = SlecetJava; buttonPython.GetComponent().sprite = UnSlecetPython; } public void buttonPythonFunction() { showC.SetActive(false); showJava.SetActive(false); showPython.SetActive(true); ScrollbarC.SetActive(false); ScrollbarJava.SetActive(false); ScrollbarPython.SetActive(true); buttonC.GetComponent().sprite = UnSlecetC; buttonJava.GetComponent().sprite = UnSlecetJava; buttonPython.GetComponent().sprite = SlecetPython; } }