# SPlayableDirector

**الأعضاء** 9

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

## الدوال

### Play

void Play()

Instantiates a Playable using the provided PlayableAsset and starts playback.

القيم المرجعة

`void`

مثال

**Lua**

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

```

### Stop

void Stop()

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

القيم المرجعة

`void`

مثال

**Lua**

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

```

### Pause

void Pause()

Pause playback of the currently running playable.

القيم المرجعة

`void`

مثال

**Lua**

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

```

### Resume

void Resume()

Resume playing a paused playable.

القيم المرجعة

`void`

مثال

**Lua**

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

```

## الخصائص

### State

int State {get; }

The current playing state of the component.

مثال

**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.

مثال

**Lua**

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

```

### InitialTime

double InitialTime {get; set; }

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

مثال

**Lua**

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

```

### Duration

double Duration {get; }

The duration of the Playable in seconds.

مثال

**Lua**

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

```

### GameObject

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

مثال

**Lua**

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

```
