private void HandleMultiPointerAction(Vector2 cameraPosition, int index, OnMultiPointer eventToNotify, OnPointer pointerEventToNotify) { Vector3 worldPosition = Camera.main.ScreenToWorldPoint(cameraPosition); RaycastHit results = default(RaycastHit); if (_providePonterRaycast) { Physics.Raycast(cameraPosition, Camera.main.transform.forward, out results); } if (eventToNotify != null) { eventToNotify(cameraPosition, index, results); } if (index == 0 && pointerEventToNotify != null) { pointerEventToNotify(cameraPosition, results); } }
private void HandleMultiPointerAction(Vector2 cameraPosition, int index, OnMultiPointer eventToNotify, OnPointer pointerEventToNotify) { Vector3 worldPosition = Camera.main.ScreenToWorldPoint(cameraPosition); RaycastHit2D[] results = null; if (_providePonterRaycast) { results = new RaycastHit2D[_maxRaycastResults]; Physics2D.Raycast(worldPosition, Vector2.zero, _contactFilter, results); } if (eventToNotify != null) { eventToNotify(cameraPosition, worldPosition, index, results); } if (index == 0 && pointerEventToNotify != null) { pointerEventToNotify(cameraPosition, worldPosition, results); } }