# SPlayableDirector

**Members** 9

|          |                             |                                                                               |
| -------- | --------------------------- | ----------------------------------------------------------------------------- |
| Function | [Play](#play)               | Instantiates a Playable using the provided PlayableAsset and starts playback. |
| Function | [Stop](#stop)               | Stop playback of the current Playable and destroys the corresponding graph.   |
| Function | [Pause](#pause)             | Pause playback of the currently running playable.                             |
| Function | [Resume](#resume)           | Resume playing a paused playable.                                             |
| Property | [State](#state)             | The current playing state of the component.                                   |
| Property | [Time](#time)               | The component's current time.                                                 |
| Property | [InitialTime](#initialtime) | The time at which the Playable should start when first played.                |
| Property | [Duration](#duration)       | The duration of the Playable in seconds.                                      |
| Property | [GameObject](#gameobject)   | –                                                                             |

## Functions

### Play

void Play()

Instantiates a Playable using the provided PlayableAsset and starts playback.

Returns

`void`

Example

**Lua**

```lua
Space.Host.ExecutingObject.Director.Play()

```

### Stop

void Stop()

Stop playback of the current Playable and destroys the corresponding graph.

Returns

`void`

Example

**Lua**

```lua
Space.Host.ExecutingObject.Director.Stop()

```

### Pause

void Pause()

Pause playback of the currently running playable.

Returns

`void`

Example

**Lua**

```lua
Space.Host.ExecutingObject.Director.Pause()

```

### Resume

void Resume()

Resume playing a paused playable.

Returns

`void`

Example

**Lua**

```lua
Space.Host.ExecutingObject.Director.Resume()

```

## Properties

### State

int State {get; }

The current playing state of the component.

Example

**Lua**

```lua
intState = Space.Host.ExecutingObject.Director.State

```

### Time

double Time {get; set; }

The component's current time. This value is incremented according to the PlayableDirector.timeUpdateMode when it is playing. You can also change this value manually.

Example

**Lua**

```lua
Space.Host.ExecutingObject.Director.Time = 10

```

### InitialTime

double InitialTime {get; set; }

The time at which the Playable should start when first played.

Example

**Lua**

```lua
Space.Host.ExecutingObject.Director.Time = 2

```

### Duration

double Duration {get; }

The duration of the Playable in seconds.

Example

**Lua**

```lua
duration = Space.Host.ExecutingObject.Director.Duration

```

### GameObject

[SGameObject](/docs/scripting/client-scripting-api-reference/types/sgameobject.md) GameObject {get; }

Example

**Lua**

```lua
theGameObject = Space.Host.ExecutingObject.Director.GameObject

```
