U3D UGUI里image的active属性怎么设置

2025-01-26 14:06:00
推荐回答(1个)
回答1:

需要在头文件里面定义一下
我圈中的那***哪里,不能没办法获取到image组件
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using UnityEngine.Sprites;
public class OnButton : MonoBehaviour {
private Button button;
private Image image;
void Start () {
button=this.GetComponent