예제 #1
0
        /*--------------------------------------------------------------------------------------------*/
        public virtual Vector3 GetNearestWorldPosition(Ray pFromWorldRay, out RaycastResult pRaycast)
        {
            if (ButtonRenderer != null)
            {
                return(ButtonRenderer.GetNearestWorldPosition(pFromWorldRay, out pRaycast));
            }

            if (SliderRenderer != null)
            {
                return(SliderRenderer.GetNearestWorldPosition(pFromWorldRay, out pRaycast));
            }

            throw new Exception("No button or slider renderer.");
        }
예제 #2
0
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public virtual Vector3 GetNearestWorldPosition(Vector3 pFromWorldPosition)
        {
            if (ButtonRenderer != null)
            {
                return(ButtonRenderer.GetNearestWorldPosition(pFromWorldPosition));
            }

            if (SliderRenderer != null)
            {
                return(SliderRenderer.GetNearestWorldPosition(pFromWorldPosition));
            }

            throw new Exception("No button or slider renderer.");
        }