# WorldPointToSizedRect(Vector3, GUIContent, GUIStyle)

> Calculate a rectangle to display a 2D GUI element near a projected point in 3D space.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.3/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

```csharp
public static Rect WorldPointToSizedRect(Vector3 position, GUIContent content, GUIStyle style)
```

### Parameters

**** (\[Vector3]\(/engine/6000.3/script-reference/unityengine/vector3)): The world-space position to use.**** (\[GUIContent]\(/engine/6000.3/script-reference/unityengine/guicontent)): The content to make room for.**** (\[GUIStyle]\(/engine/6000.3/script-reference/unityengine/guistyle)): The style to use. The style's alignment.

### Returns

| Type                                                        | Description |
| ----------------------------------------------------------- | ----------- |
| [Rect](/engine/6000.3/script-reference/unityengine/rect.md) |             |

### Remarks

This function is useful when 3D objects need labels or other 2D controls that follow them around in 3D space as the camera moves.
