# Sandbox.Animation.ClipBuilder.AddEvent

```csharp
ClipBuilder AddEvent(float time, AnimationEvent payload, float duration = 0)
```

Add a registered game-defined animation event with normalized start time and duration.
            Each clip accepts 1024 events and 1 MiB of event data, with up to 64 KiB of JSON per event.

### Parameters

- `time` (`float`)
- `payload` (`AnimationEvent`)
- `duration` (`float`), default `0`

### Returns

`ClipBuilder`

Declared in [Sandbox.Animation.ClipBuilder](/api/Sandbox.Animation.ClipBuilder).
Assembly: `Sandbox.Engine`.
