2021년 4학년 1학기 기업연계프로젝트2 컴퓨터소프트웨어공학과 <원광투어팀> 팀장 : 송유진 팀원 : 김나영, 이경희, 한유진
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.0 KiB

5 years ago
  1. //========= Copyright 2016-2020, HTC Corporation. All rights reserved. ===========
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.EventSystems;
  5. namespace HTC.UnityPlugin.Pointer3D
  6. {
  7. public class GraphicRaycastMethod : BaseRaycastMethod
  8. {
  9. [SerializeField]
  10. private Canvas m_Canvas;
  11. [SerializeField]
  12. private bool m_IgnoreReversedGraphics = true;
  13. public Canvas canvas { get { return m_Canvas; } set { m_Canvas = value; } }
  14. public bool ignoreReversedGraphics { get { return m_IgnoreReversedGraphics; } set { m_IgnoreReversedGraphics = value; } }
  15. #if UNITY_EDITOR
  16. protected virtual void Reset()
  17. {
  18. if (m_Canvas == null)
  19. {
  20. m_Canvas = FindObjectOfType<Canvas>();
  21. }
  22. }
  23. #endif
  24. public override void Raycast(Ray ray, float distance, List<RaycastResult> raycastResults)
  25. {
  26. CanvasRaycastMethod.Raycast(canvas, ignoreReversedGraphics, ray, distance, raycaster, raycastResults);
  27. }
  28. }
  29. }