Skip to main content

Examples

Complete scripts from the StageTime test playground. The code on these pages is read straight from the playground's script files, so it always matches what is built and tested.

ExampleShows
Rotating cubeInteract, a synced bool, ownership
CounterUI buttons, synced int, OnDeserialization
Tick-synced cubeShared clock, motion with no per-frame sync
ScoreboardCalling another script, synced arrays, GetProgramVariable
Pickup colourST Pickup events and the use button
Seat boardST Seat events
Teleport padPlayer triggers, TeleportTo
Network eventsSendCustomNetworkEvent, delayed events
Player boardPlayer list, join and leave events
Unity API demoA tour of the allowed Unity API
Video controlsST Video Player: synced playback, sync modes, video events
Drivable carPlayer input, a seat with Take Controls, ST Object Sync physics
Spin the bottleRandom, an animation everyone sees in step from the room clock
Video seek barA Slider that follows a video and seeks it
Input testerStageTimeInput, GetButtonValue and every input event
UI controlsSynced Toggle and Slider, SetValueWithoutNotify
Reset objectsArrays of components, ST Object Sync Respawn
Card deckSTPickup.HandOver, synced arrays, shuffling, one atlas for 52 cards
Catalogue browserST Data Table: paging, sorting and searching 40,000 rows
Request queueST Queue: requests, removing entries, host-only clear
Queue video playerPlaying an ST Queue on an ST Video Player, one turn at a time
Image galleryST Image Loader, a synced picture number, fitting the frame to the picture