protected override void OnDisable() { Pointer3DInputModule.RemoveRaycasters(this); sortedRaycastResults.Clear(); breakPoints.Clear(); //base.OnDisable(); }
public override string ToString() { var str = string.Empty; str += "eligibleForClick: " + eligibleForClick + "\n"; str += "pointerEnter: " + Pointer3DInputModule.PrintGOPath(pointerEnter) + "\n"; str += "pointerPress: " + Pointer3DInputModule.PrintGOPath(pointerPress) + "\n"; str += "lastPointerPress: " + Pointer3DInputModule.PrintGOPath(lastPress) + "\n"; str += "pressEnter: " + Pointer3DInputModule.PrintGOPath(pressEnter) + "\n"; str += "pointerDrag: " + Pointer3DInputModule.PrintGOPath(pointerDrag) + "\n"; return(str); }
protected override void Start() { base.Start(); if (m_raycastMode != RaycastMode.DefaultRaycast) { SetLagacyRaycastMode(m_raycastMode); m_raycastMode = RaycastMode.DefaultRaycast; } Pointer3DInputModule.AddRaycaster(this); }
public static void Initialize() { if (Active || isApplicationQuitting) { return; } var instances = FindObjectsOfType <Pointer3DInputModule>(); if (instances.Length > 0) { instance = instances[0]; if (instances.Length > 1) { Debug.LogWarning("Multiple Pointer3DInputModule not supported!"); } } if (!Active) { EventSystem eventSystem = EventSystem.current; if (eventSystem == null) { eventSystem = FindObjectOfType <EventSystem>(); } if (eventSystem == null) { eventSystem = new GameObject("[EventSystem]").AddComponent <EventSystem>(); } if (eventSystem == null) { Debug.LogWarning("EventSystem not found or create fail!"); return; } instance = eventSystem.gameObject.AddComponent <Pointer3DInputModule>(); } if (Active) { DontDestroyOnLoad(instance.gameObject); } }
public override string ToString() { var str = string.Empty; str += "Raycaster path: " + Pointer3DInputModule.PrintGOPath(gameObject) + "(" + GetType().Name + ")\n"; str += "Raycaster transform: " + "pos" + transform.position.ToString("0.00") + " " + "rot" + transform.eulerAngles.ToString("0.0") + "\n"; for (int i = 0, imax = buttonEventDataList.Count; i < imax; ++i) { var eventData = buttonEventDataList[i]; if (eventData == null) { continue; } if (eventData.eligibleForClick || (i == 0 && eventData.pointerEnter != null)) // is hover event? { str += "<b>EventData: [" + i + "]</b>\n"; str += eventData.ToString(); } } return(str); }
protected override void OnDestroy() { Pointer3DInputModule.RemoveRaycasters(this); base.OnDestroy(); }
protected override void Awake() { base.Awake(); Pointer3DInputModule.AddRaycaster(this); }
protected override void OnDisable() { //base.OnDisable(); Pointer3DInputModule.RemoveRaycaster(this); }
// override OnEnable & OnDisable on purpose so that this BaseRaycaster won't be registered into RaycasterManager protected override void OnEnable() { //base.OnEnable(); Pointer3DInputModule.AddRaycaster(this); }
public Pointer3DEventData(Pointer3DRaycaster ownerRaycaster, EventSystem eventSystem) : base(eventSystem) { raycaster = ownerRaycaster; Pointer3DInputModule.AssignPointerId(this); }
protected override void Start() { base.Start(); Pointer3DInputModule.AddRaycaster(this); }
public Pointer3DEventData(EventSystem eventSystem) : base(eventSystem) { Pointer3DInputModule.AssignPointerId(this); }