Tanoda
TurnOffImages.cs
Go to the documentation of this file.
1using NaughtyAttributes;
2using System.Collections;
3using System.Collections.Generic;
4using UnityEngine;
5using UnityEngine.UI;
6
7public class TurnOffImages : MonoBehaviour
8{
9 // Start is called before the first frame update
10 void Start()
11 {
12
13 }
14
15 // Update is called once per frame
16[Button]
17public void TurnOff()
18 {
19 var components = GetComponentsInChildren<Graphic>();
20 foreach (var component in components)
21 {
22 component.enabled = false;
23 }
24 }
25
26}
UnityEngine.UI.Button Button
Definition: Pointer.cs:7