Beispiel #1
0
        public void RaycastAll(PointerEventData eventData, List <RaycastResult> raycastResults)
        {
            raycastResults.Clear();
            var modules = RaycasterManager.GetRaycasters();

            for (int i = 0; i < modules.Count; ++i)
            {
                var module = modules[i];
                if (module == null || !module.IsActive())
                {
                    continue;
                }

                module.Raycast(eventData, raycastResults);
            }

            raycastResults.Sort(s_RaycastComparer);
        }
Beispiel #2
0
 protected override void OnDisable()
 {
     RaycasterManager.RemoveRaycasters(this);
     base.OnDisable();
 }
Beispiel #3
0
 protected override void OnEnable()
 {
     base.OnEnable();
     RaycasterManager.AddRaycaster(this);
 }