using UnityEngine;
using System.Collections;
public class hh : MonoBehaviour {
public bool e = true;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnMouseDown(){
if(UICamera.hoveredObject == null){
if(e==true){
GameObject.Find("box").renderer.material.color = Color.red;
e=false;
}
else if(e==false){
GameObject.Find("box").renderer.material.color = Color.yellow;
e=true;
}
}
}
NGUI点击按钮时如何屏蔽场景鼠标事件
最新推荐文章于 2021-06-21 12:05:03 发布