LogoLogo
Scripting DocsSupport
Scripting
Scripting
  • Sinespace Scripting Documentation
  • Client Scripting
    • Viewer
      • SDialogues
      • SInput
      • SShared
      • SUI
    • Network
      • SChat
      • SNetwork
      • SPhotos
      • SVideos
      • SWebService
    • Player
      • SEconomy
      • SGroup
      • SInventory
      • SProfile
      • SQuests
    • Region
      • SCameraManager
      • SGrid
      • SHost
      • SPersistence
      • SPhysics
      • SPostFX
      • SScene
      • SScript
      • SRenderSettings
    • Components
      • SAnimation
      • SAnimator
      • SAudioReactiveAnimation
      • SAudioReactiveBase
      • SAudioReactiveLight
      • SAudioReactiveMaterial
      • SAudioReactiveParticleSystem
      • SAudioReactiveTransform
      • SAudioSource
      • SBoxCollider
      • SBrowserSurface
      • SCamera
      • SCanvasGroup
      • SCapsuleCollider
      • SCharacterController
      • SClickable
      • SCloth
      • SCollider
      • SContentSizeFitter
      • SEmbeddedVideo
      • SEventCalendar
      • SFurniture
      • SGraphicRaycaster
      • SHingeJoint
      • SLight
      • SLineRenderer
      • SMeshRenderer
      • SModularVehicle
      • SNavMeshAgent
      • SNavMeshObstacle
      • SNetworking
      • SParticleSystem
      • SPlayableDirector
      • SPostProcessVolume
      • SRectTransform
      • SReflectionProbe
      • SRenderer
      • SRigidbody
      • SRoomFloor
      • SSceneBackgroundMusic
      • SScriptingData
      • SScriptingEvents
      • SScriptingResources
      • SScriptingRuntime
      • SSeat
      • SSkinnedMeshRenderer
      • SSphereCollider
      • SStateMachine
      • STerrain
      • STrailRenderer
      • SUIButton
      • SUICanvas
      • SUIDropdown
      • SUIImage
      • SUIInputField
      • SUILayout
      • SUIRawImage
      • SUIScrollbar
      • SUISlider
      • SUIText
      • SUIToggle
      • SUIToolTipHint
      • SVirtualCamera
      • SVoiceZone
    • Types
      • SAnimationState
      • SAnimatorStateInfo
      • SAvatar
      • SAvatarAppearance
      • SChatMessage
      • SColor
      • SCommandBuffer
      • SDateTime
      • SGameObject
      • SGenre
      • SGroupInfo
      • SInventoryItem
      • SJointLimits
      • SJointMotor
      • SJointSpring
      • SLandmark
      • SLayerMask
      • SMaterial
      • SMath
      • SMusicDirectory
      • SMusicStation
      • SMusicStationList
      • SNetworkMessageLua
      • SOutfit
      • SParticle
      • SPhysicsHit
      • SPublicRegion
      • SQuaternion
      • SRay
      • SRect
      • SResource
      • SScore
      • SScoreRank
      • SString
      • SSubRegion
      • STrackInfo
      • STuneIn
      • SUIRaycastResult
      • SUserRegions
      • SVector
      • SUserProfile
      • SSocialMedia
      • SWebResponse
  • Server Scripting
    • Library
      • SMath
    • Network
      • SShared
      • SWebservice
    • Region
      • SAvatar
      • SCell
      • SObject
      • SParcel
      • SParcelManager
      • SRegionScript
      • SScene
    • Storage
      • SDatabase
  • Guides
    • Persistence
    • Server Scripts
  • Sample Projects
    • Smart Lights
    • Trivia Box
  • Changelog
    • API Changelog
  • Support
    • Report An Issue
Powered by GitBook

Sinespace® is a registered trademark of Sine Wave Entertainment Ltd, All Rights Reserved.

On this page
  • Introduction
  • Client Scripts vs Server Scripts
  • Your first Client Script
  • Your first Server Script

Was this helpful?

Export as PDF

Sinespace Scripting Documentation

Sinespace Scripting Documentation

NextViewer

Last updated 2 years ago

Was this helpful?

This documentation is in progress. Please visit to report any issues, missing information, corrections or suggestions you may have.

Introduction

Scripting in Sinespace uses the Lua programming language.

Sinespace offers scripters Unity components, which are added to GameObjects, that will run the scripts(code) that we write inside them.

These Unity components come within the Sinespace Editor Pack package, which needs to be installed in our Unity project before we begin scripting.

Our core class is the class, which is accessed by writing "Space".

Example: Space.Log('Hello World') is equivalent to .

All of your functions/properties will be accessed starting with 'Space' which also navigates to other classes. There's very few exceptions that are accessed directly such as "Math" () and "Color"().

Example: Space.Network.SendNetworkMessage() this starts with the class and goes into the class.

Client Scripts vs Server Scripts

Client scripts run client-side, and Server scripts run server-side.

Browsing the left panel of this documentation you will find that our API Reference is split into two different parts - Client Scripting and Server Scripting.

Your first Client Script

To begin creating your first Sinespace Client Script, make sure you have the Sinespace Editor Pack properly installed, and then:

  • Select your GameObject

  • Click Add Component

  • Search for and select Scripting Runtime

  • Enter your code in the Script Contents text box - for example Space.Log('Hello World!')

  • Press Play Scene (you should see your "Hello World!" in the Unity console window)

Your first Server Script

It's recommended that new scripters familiarize themselves with Client scripts first before jumping into Server scripts, or creating more complicated objects that require server scripts.

Visit the to begin your first Server script.

Server Scripts guide
this page
SScript
SMath
SColor
SScript
SNetwork
SScript.Log('Hello world')