# RoleProviderAttribute

> Constructor for a RoleProviderAttribute. Allows you to register a handler that is triggered when a specific ProcessEvent is triggered in a UnityEditor process of a specific ProcessLevel.

## Definition

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

## RoleProviderAttribute(string, ProcessEvent)

Constructor for a RoleProviderAttribute. Allows you to register a handler that is triggered when a specific [ProcessEvent](/engine/6000.6/script-reference/unityeditor/mpe/processevent.md) is triggered in a UnityEditor process of a specific [ProcessLevel](/engine/6000.6/script-reference/unityeditor/mpe/processlevel.md).

```csharp
public RoleProviderAttribute(string name, ProcessEvent eventType)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the RoleProvider. For example, StandaloneProfiler.**** (\[ProcessEvent]\(/engine/6000.6/script-reference/unityeditor/mpe/processevent)): The event that the process triggered.

## RoleProviderAttribute(ProcessLevel, ProcessEvent)

Constructor for a RoleProviderAttribute. Allows you to register a handler that is triggered when a specific [ProcessEvent](/engine/6000.6/script-reference/unityeditor/mpe/processevent.md) is triggered in a UnityEditor process of a specific [ProcessLevel](/engine/6000.6/script-reference/unityeditor/mpe/processlevel.md).

```csharp
public RoleProviderAttribute(ProcessLevel level, ProcessEvent eventType)
```

### Parameters

**** (\[ProcessLevel]\(/engine/6000.6/script-reference/unityeditor/mpe/processlevel)): The process level (either master or slave) that this handler should be registered on.**** (\[ProcessEvent]\(/engine/6000.6/script-reference/unityeditor/mpe/processevent)): The event that the process triggered.
