# AcceptsElement(GraphElement, ref string)

> Whether the GraphElement can be added to this scope.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Experimental.GraphView](/engine/6000.5/script-reference/unityeditor/experimental/graphview.md)
* **Assembly:** UnityEditor

## AcceptsElement(GraphElement, string)

```csharp
public virtual bool AcceptsElement(GraphElement element, ref string reasonWhyNotAccepted)
```

### Parameters

**** (\[GraphElement]\(/engine/6000.5/script-reference/unityeditor/experimental/graphview/graphelement)): The element to add.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The reason why the specified element cannot be added to the Scope.

### Returns

| Type                                                          | Description                                                                              |
| ------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true if the specified element is accepted by the Scope. Returns false otherwise. |
