# CreateEvent()

> Creates a new event.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.LightTransport](/engine/6000.6/script-reference/unityengine/lighttransport.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public EventID CreateEvent()
```

### Returns

| Type                                                                             | Description                |
| -------------------------------------------------------------------------------- | -------------------------- |
| [EventID](/engine/6000.6/script-reference/unityengine/lighttransport/eventid.md) | ID of newly created event. |

### Remarks

The event may be passed to [IDeviceContext.ReadBuffer](/engine/6000.6/script-reference/unityengine/lighttransport/idevicecontext/readbuffer.md) and [IDeviceContext.WriteBuffer](/engine/6000.6/script-reference/unityengine/lighttransport/idevicecontext/writebuffer.md) to track when the corresponding read or write finishes. Once the event is no longer needed, it should be destroyed using [IDeviceContext.DestroyEvent](/engine/6000.6/script-reference/unityengine/lighttransport/idevicecontext/destroyevent.md).
