# AddInput(string, string, string, int, ClusterInputType)

> Add a new VRPN input entry.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.ClusterInputModule

> **Warning:**
>
> **Deprecated.** This type is deprecated and will be removed in a future release.

```csharp
public static bool AddInput(string name, string deviceName, string serverUrl, int index, ClusterInputType type)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Name of the input entry. This has to be unique.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Device name registered to VRPN server.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): URL to the vrpn server.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Index of the Input entry, refer to vrpn.cfg if unsure.**** (\[ClusterInputType]\(/engine/6000.0/script-reference/unityengine/clusterinputtype)): Type of the input.

### Returns

| Type                                                          | Description                    |
| ------------------------------------------------------------- | ------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the operation succeed. |

### Remarks

The parameters are identical to how you add a input via “Project Setting > Cluster Input”. Input entry added via this method only valid for the lifetime of the application session. The added entry will not persist like those you added via the “Project Setting > Cluster Input”.

```csharp
using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour
{
    void AddNewClusterInputEntry()
    {
        // Add a new entry named "new_button_1". Which is a mouse connected to VRPN at localhost.
        ClusterInput.AddInput("new_button_1", "mouse_0", "localhost", 0, ClusterInputType.Button);
    }
}
```

Additional Resources:[ClusterInput.EditInput](/engine/6000.0/script-reference/unityengine/clusterinput/editinput.md).
