ToolTipUtility.FindClosestAttachPointToAnchor Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Avoid running this query in Update function because calculating Vector3.Distance requires sqr root calculation (expensive) Instead, find strategic moments to update nearest pivot (i.e. only once when ToolTip becomes active)
public:
static UnityEngine::Vector3 FindClosestAttachPointToAnchor(UnityEngine::Transform ^ anchor, UnityEngine::Transform ^ contentParent, cli::array <UnityEngine::Vector3> ^ localPivotPositions, Microsoft::MixedReality::Toolkit::UI::ToolTipAttachPoint pivotType);
public static UnityEngine.Vector3 FindClosestAttachPointToAnchor (UnityEngine.Transform anchor, UnityEngine.Transform contentParent, UnityEngine.Vector3[] localPivotPositions, Microsoft.MixedReality.Toolkit.UI.ToolTipAttachPoint pivotType);
static member FindClosestAttachPointToAnchor : UnityEngine.Transform * UnityEngine.Transform * UnityEngine.Vector3[] * Microsoft.MixedReality.Toolkit.UI.ToolTipAttachPoint -> UnityEngine.Vector3
Public Shared Function FindClosestAttachPointToAnchor (anchor As Transform, contentParent As Transform, localPivotPositions As Vector3(), pivotType As ToolTipAttachPoint) As Vector3
Parameters
- anchor
- UnityEngine.Transform
Transform of object serving as anchor for tooltip
- contentParent
- UnityEngine.Transform
Transform for the tooltip content
- localPivotPositions
- UnityEngine.Vector3[]
list of positions to find the closest
- pivotType
- ToolTipAttachPoint
pivot type needed for calculation of closest
Returns
UnityEngine.Vector3
Vector3 the point in localPivotPositions which is closest to the anchor position