IgnoreUiRaycastWhenInactive.cs 693 B

1234567891011121314151617181920
  1. // --------------------------------------------------------------------------------------------------------------------
  2. // <copyright company="Exit Games GmbH"/>
  3. // <summary>Demo code for Photon Chat in Unity.</summary>
  4. // <author>developer@exitgames.com</author>
  5. // --------------------------------------------------------------------------------------------------------------------
  6. using UnityEngine;
  7. namespace Photon.Chat.Demo
  8. {
  9. public class IgnoreUiRaycastWhenInactive : MonoBehaviour, ICanvasRaycastFilter
  10. {
  11. public bool IsRaycastLocationValid(Vector2 screenPoint, Camera eventCamera)
  12. {
  13. return this.gameObject.activeInHierarchy;
  14. }
  15. }
  16. }