private void SetPosition()
 {
     if (isDecorationSet && !(manipulatableObject == null))
     {
         Vector3 vector = IglooTargetUtil.GetBaseOfTargetPoint(manipulatableObject, minCameraDistance);
         if (!boundsForCameraTarget.Contains(vector))
         {
             vector = boundsForCameraTarget.ClosestPoint(vector);
         }
         Vector3 vector2 = Camera.main.WorldToScreenPoint(vector);
         Vector3 vector3 = vector2 * (1f / canvas.scaleFactor);
         vector3.y += panelTransform.rect.height * 0.25f;
         panelTransform.anchoredPosition = vector3;
     }
 }
        private void calculateTargetPositionForSelectedObject(ManipulatableObject mo)
        {
            switch (sceneStateData.State)
            {
            case SceneStateData.SceneState.Edit:
                if (mo.Type == DecorationLayoutData.DefinitionType.Structure)
                {
                    return;
                }
                break;

            case SceneStateData.SceneState.StructurePlacement:
                if (mo.Type == DecorationLayoutData.DefinitionType.Decoration)
                {
                    return;
                }
                break;
            }
            Vector3 baseOfTargetPoint = IglooTargetUtil.GetBaseOfTargetPoint(mo, MinCameraTargetDistanceOnNewItem);

            updateEditCameraTargetPosition(baseOfTargetPoint);
            CenterCameraOnSelect = false;
            eventDispatcher.DispatchEvent(new IglooUIEvents.ShowSelectedUIWidget(mo, boundsForCameraTarget, MinCameraTargetDistanceOnNewItem));
        }