# SetCreateFunction(Func<T>)

> Allows to provide a function to create the event instance without relying on Activator.CreateInstance.

## Definition

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

```csharp
protected static void SetCreateFunction(Func<T> createMethod)
```

### Parameters

**** (\[Func\<T>]\(https\://learn.microsoft.com/dotnet/api/system.func-1)): The creation function.
