123456789101112131415161718192021222324252627282930 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class MakeEneutralButton : MonoBehaviour
- {
- // Start is called before the first frame update
- public Material initM;
- public Material clickM;
- public GameObject suerClickGameObj;
- private void Start()
- {
- suerClickGameObj = this.transform.parent.transform.Find("CheckBoxCheck").gameObject;
- }
- public void SetUserClickThis(bool isClick)
- {
- if (isClick)
- {
- this.GetComponent<MeshRenderer>().material = clickM;
- suerClickGameObj.SetActive(true);
- }
- else
- {
- this.GetComponent<MeshRenderer>().material = initM;
- suerClickGameObj.SetActive(false);
- }
- }
- }
|