wiki.sine.space | sinespace

Difference between revisions of "Scripting/SPlayableDirector"

From wiki.sine.space
Jump to: navigation, search
(Created page with "=Members= {{ScriptFunction|void|Play|();|Instantiates a Playable using the provided PlayableAsset and starts playback.|5= director = Space.Scene.Find(“Director”).Director...")
 
(Replaced content with "This page has moved to: https://docs.sine.space/v/scripting/client-scripting/components/splayabledirector")
 
Line 1: Line 1:
=Members=
+
This page has moved to: https://docs.sine.space/v/scripting/client-scripting/components/splayabledirector
 
+
{{ScriptFunction|void|Play|();|Instantiates a Playable using the provided PlayableAsset and starts playback.|5=
+
director = Space.Scene.Find(“Director”).Director<br>
+
''--get playable director component from game object.''<br>
+
director.Play()<br>
+
''--start playable on the director.''
+
}}
+
 
+
{{ScriptFunction|void|Stop|();|Stop playback of the current Playable and destroys the corresponding graph.|5=
+
director = Space.Scene.Find(“Director”).Director<br>
+
''--get playable director component from game object.''<br>
+
director.Stop()<br>
+
''--stop playable director.''
+
}}
+
 
+
{{ScriptFunction|void|Pause|();|Pause playback of the currently running playable.|5=
+
director = Space.Scene.Find(“Director”).Director<br>
+
''--get playable director component from game object.''<br>
+
director.Pause()<br>
+
''--pause playable director.''
+
}}
+
 
+
{{ScriptFunction|void|Resume|();|Resume playing a paused playable.|5=
+
director = Space.Scene.Find(“Director”).Director<br>
+
''--get playable director component from game object.''<br>
+
director.Resume()<br>
+
''--resume playable director.''
+
}}
+
 
+
=Properties=
+
 
+
{{ScriptFunction|int|State|{get;}|The current playing state of the component.|5=
+
director = Space.Scene.Find(“Director”).Director<br>
+
''--get playable director component from game object.''<br>
+
director.Stop()<br>
+
''--stop playable director.''<br>
+
Space.Log(director.State)<br>
+
''--output state of playable director.''
+
}}
+
 
+
{{ScriptFunction|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.|5=
+
director = Space.Scene.Find(“Director”).Director<br>
+
''--get playable director component from game object.''<br>
+
director.Time = 1<br>
+
''--play at 1 second.''
+
}}
+
 
+
{{ScriptFunction|double|InitialTime|{get; set;}|The time at which the Playable should start when first played.|5=
+
director = Space.Scene.Find(“Director”).Director<br>
+
''--get playable director component from game object.''<br>
+
director.InitialTime = 3<br>
+
director.Stop()<br>
+
director.Play()<br>
+
''--set initial time to 3 and replay.''
+
}}
+
 
+
{{ScriptFunction|double|Duration|{get;}|The duration of the Playable in seconds.|5=
+
director = Space.Scene.Find(“Director”).Director<br>
+
''--get playable director component from game object.''<br>
+
director.Duration = 3<br>
+
''--set duration to 3.''
+
}}
+
 
+
{{Scripting Navbox}}
+

Latest revision as of 06:14, 19 September 2022

This page has moved to: https://docs.sine.space/v/scripting/client-scripting/components/splayabledirector