# CreateVisualElement()

> CreateVisualElement is called when a Viewpoint is selected in the Cameras Overlay.

## Definition

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

```csharp
public virtual VisualElement CreateVisualElement()
```

### Returns

| Type                                                                                     | Description                                                                              |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| [VisualElement](/engine/6000.6/script-reference/unityengine/uielements/visualelement.md) | The VisualElement to attach to the Cameras Overlay when the associated camera is active. |

### Remarks

Viewpoint sends visual information directly on to the Cameras overlay. Provide a reference of an instance of VisualElement and it attaches underneath the Cameras overlay toolbar when a Camera is being looked through.
