# EventInterestAttribute

> Use this constructor when the affected method uses only specific event types that can easily be determined at compile time. Multiple EventInterestAttribute can be used on the same method to add more type interests.

## Definition

* **Type:** Constructor
* **Namespace:** [UnityEngine.UIElements](/engine/6000.3/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

## EventInterestAttribute(Type\[])

Use this constructor when the affected method uses only specific event types that can easily be determined at compile time. Multiple [EventInterestAttribute](/engine/6000.3/script-reference/unityengine/uielements/eventinterestattribute.md) can be used on the same method to add more type interests.

```csharp
public EventInterestAttribute(params Type[] eventTypes)
```

### Parameters

**** (\[Type\[]]\(https\://learn.microsoft.com/dotnet/api/system.type)): The affected method is guaranteed to be invoked if the incoming event has any of the specified types in this argument.

## EventInterestAttribute(EventInterestOptions)

Use this constructor when the affected method treats events in a general, non type-specific manner. See [EventInterestOptions](/engine/6000.3/script-reference/unityengine/uielements/eventinterestoptions.md) for more information on the available argument values.

```csharp
public EventInterestAttribute(EventInterestOptions interests)
```

### Parameters

**** (\[EventInterestOptions]\(/engine/6000.3/script-reference/unityengine/uielements/eventinterestoptions)): The affected method is guaranteed to be invoked if the incoming event has any of the specified types in this argument.
