unity 一些小笔记 持续更新

来源:互联网 发布:海康威视网络摄像机 编辑:程序博客网 时间:2024/05/18 14:12

1.在使用unity打开Windows文件时,会遇到unity程序最小化,此时需要在PlayerSetting里勾选Visible In Background 。

2. 使用ugui会遇到点击UI的时候穿透屏幕的情况,需要加上条件:

using UnityEngine.EventSystems;

  if (EventSystem.current.IsPointerOverGameObject(0))
        {
            return;
        }
        else
        {

         Debug.Log("UI不会穿透");

}