/*--------------------------------------------------------------------------------------------*/ 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."); }
//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ 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."); }