我正在从Unity的用户界面转移到NGUI。 以前,我可以添加监听器按钮,以下脚本: button.GetComponentInChildren<Button>().onClick.AddListener(() =>
{
//codes that could be triggered by click the button.
});
但改为NGUI的时候,我不能让它的工作: Ev
我发现我们不能NGUI 分配UICamera.currentCamera一个字段变量作为Camera.main,我们必须在Update()每一次,我认为可能会导致性能问题,它分配: 这个作品 using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TestUICa
我们使用的是NGUI,一些碰撞体必须重叠,并且我们希望ONDragOver()碰撞体接收到的事件在后面,即应该通过碰撞体下方,这是一个演示情况: 更大的一个是在规模较小的顶部,和他们在同一层次,这样我可以拖动来移动所有的人。 我已经测试过,当对象拖到 void OnDragOver(GameObject that)
{
Debug.Log("you are on drag o