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