# SetDuration<U>(U, double)

> Changes the duration of the Playable.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Playables](/engine/6000.0/script-reference/unityengine/playables.md)
* **Assembly:** UnityEngine.CoreModule

## SetDuration\<T>(T, double)

```csharp
public static void SetDuration<U>(this U playable, double value) where U : struct, IPlayable
```

### Parameters

**** (T): The [Playable](/engine/6000.0/script-reference/unityengine/playables/playable.md) used by this operation.**** (\[double]\(https\://learn.microsoft.com/dotnet/api/system.double)): The new duration in seconds, must be a positive value.

### Remarks

Use this templated extension method on any type that inherits from [IPlayable](/engine/6000.0/script-reference/unityengine/playables/iplayable.md).
