12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine;
- using UnityEngine.UI;
- public class DeleteVisible : MonoBehaviour
- {
-
- // Start is called before the first frame update
-
- void Start()
- {
-
- }
- // Update is called once per frame
- void Update()
- {
-
- }
- public void setDeleteVisible() {
- GameObject parent = GameObject.Find("Canvas");
- Transform[] children = parent.GetComponentsInChildren<Transform>(true);
- foreach(Transform ch in children)
- {
- if(ch.gameObject.name == "DeleteButton")
- {
- ch.gameObject.SetActive(true);
- }
- }
- }
- public void setDeleteNonVisible() {
-
- GameObject parent = GameObject.Find("Canvas");
- Transform[] children = parent.GetComponentsInChildren<Transform>(true);
- foreach(Transform ch in children)
- {
- if(ch.gameObject.name == "DeleteButton")
- {
- ch.gameObject.SetActive(false);
-
- }
- }
- }
- }
|