override public bool UpdateStateWithInput(bool inputValid, Ray inputRay, GameObject parentActiveObject, Collider parentCollider) { // TODO : This is a bit backwards. We need to pipe input to the bottom of a // UIComponent stack, and then invalidate input as we come back up. This logic is a // deliberate version of that, but consider this a TODO for making the system work // more generally in this way. if (parentActiveObject == null || parentActiveObject == gameObject) { bool resetState = false; m_UIComponentManager.UpdateUIComponents(inputRay, inputValid, parentCollider); if (m_UIComponentManager.ActiveInputObject != null && m_UIComponentManager.ActiveInputObject != gameObject) { resetState = inputValid; inputValid = false; } if (base.UpdateStateWithInput(inputValid, inputRay, parentActiveObject, parentCollider)) { // If a child component received input, we want this component to reset its state, // so we return false to tell our parent we don't have focus anymore. return(!resetState); } } return(false); }
override public bool UpdateStateWithInput(bool inputValid, Ray inputRay, GameObject parentActiveObject, Collider parentCollider) { if (base.UpdateStateWithInput(inputValid, inputRay, parentActiveObject, parentCollider)) { if (parentActiveObject == null || parentActiveObject == gameObject) { if (BasePanel.DoesRayHitCollider(inputRay, GetCollider())) { m_UIComponentManager.UpdateUIComponents(inputRay, inputValid, parentCollider); return true; } } } return false; }
// This function is used to update the behavior state of the PopUp's components in response to // an updated input "gaze" direction from the user. virtual public void UpdateUIComponents(Ray rCastRay, bool inputValid, Collider parentCollider) { m_UIComponentManager.UpdateUIComponents(rCastRay, inputValid, parentCollider); }