public Vector3 GetOverlayPosition(Camera worldCamera, Vector3 worldPoint, Transform widgetContainer)
{
if ((object) worldCamera == null) {
return worldPoint;
}
var pos = worldCamera.WorldToScreenPoint (worldPoint);
pos = Camera.ScreenToWorldPoint (pos);
if ((object) widgetContainer != null) {
pos = widgetContainer.InverseTransformPoint (pos);
}
pos.z = 0f;
return pos;
}