# OnCreate(ref SystemState)

> Called when this system is created.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule

## OnCreate(SystemState)

```csharp
void OnCreate(ref SystemState state)
```

### Parameters

**** (\[SystemState]\(/engine/7000.0/script-reference/unity/entities/systemstate)): The [SystemState](/engine/7000.0/script-reference/unity/entities/systemstate.md) backing this system instance

### Remarks

Implement an `OnCreate` function to set up system resources when it is created.

`OnCreate` is invoked before the the first time [ISystemStartStop.OnStartRunning](/engine/7000.0/script-reference/unity/entities/isystemstartstop/onstartrunning.md) and [ISystem.OnUpdate](/engine/7000.0/script-reference/unity/entities/isystem/onupdate.md) are invoked.
