Example #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);
        }
Example #2
0
 protected override void OnDisable()
 {
     RaycasterManager.RemoveRaycasters(this);
     base.OnDisable();
 }
Example #3
0
 protected override void OnEnable()
 {
     base.OnEnable();
     RaycasterManager.AddRaycaster(this);
 }