# AcceptsElement(GraphElement, ref int, int)

> Checks whether the specified GraphElement can be added to this StackNode.

## Definition

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

## AcceptsElement(GraphElement, int, int)

```csharp
protected virtual bool AcceptsElement(GraphElement element, ref int proposedIndex, int maxIndex)
```

### Parameters

**** (\[GraphElement]\(/engine/6000.7/script-reference/unityeditor/experimental/graphview/graphelement)): The element to add.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The index where the element would be added. This index can be overwritten.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The maximum value of the index.

### Returns

| Type                                                          | Description                                                                       |
| ------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true if the specified GraphElement can be added. Returns false otherwise. |
