Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public IEnumerator LoadClick(RaycastResult result, VRTK_UIPointer pointer)
- {
- float time = 0;
- while (time < loadingTime)
- {
- time += Time.deltaTime;
- progressBar.GetComponent<Image>().fillAmount = time / loadingTime;
- yield return null;
- }
- m(result, pointer);
- }
- private void m(RaycastResult result, VRTK_UIPointer pointer)
- {
- progressBar.GetComponent<Image>().fillAmount = 1;
- var target = ExecuteEvents.ExecuteHierarchy(result.gameObject, pointer.pointerEventData, ExecuteEvents.pointerDownHandler);
- m2(result, pointer, target);
- progressBar.GetComponent<Image>().fillAmount = 0;
- }
- private static void m2(RaycastResult result, VRTK_UIPointer pointer, GameObject target)
- {
- if (target != null)
- {
- pointer.pointerEventData.pressPosition = pointer.pointerEventData.position;
- pointer.pointerEventData.pointerPressRaycast = result;
- pointer.pointerEventData.pointerPress = target;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement