Skip to content

Instantly share code, notes, and snippets.

@yangruihan
Created August 10, 2016 03:35
Show Gist options
  • Select an option

  • Save yangruihan/458f69bc736094b061b64fe79362b917 to your computer and use it in GitHub Desktop.

Select an option

Save yangruihan/458f69bc736094b061b64fe79362b917 to your computer and use it in GitHub Desktop.
Unity 使UI组件忽略点击事件响应
using UnityEngine;
using System.Collections;
public class TouchIgnore : MonoBehaviour, ICanvasRaycastFilter
{
public bool IsRaycastLocationValid(Vector2 screenPoint, Camera eventCamera)
{
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment