The example world

Since SDK 0.2.1

The Example World sample of NodeWorld SDK Worlds is a small world to walk in, with one FL# script per thing a world often needs. Import it from the Package Manager: select NodeWorld SDK Worlds, tab Samples, Import (install the SDK).

Open ExampleWorld.unity in Assets/Samples/NodeWorld SDK Worlds/<version>/Example World, then press Play: you arrive on the blue pad, the stations stand around the plaza.

What each station shows

StationScript (in Flux/)What it does
Mirror, in front of youPlanarMirror.csA camera made by the script renders the reflection, one image per eye in VR, only while you look at the mirror. Its material uses the shader NodeWorld Example/Mirror.
Television, on the rightTelevision.csType a video address in the field and press Play / Pause: everyone sees the same video at the same moment, players who arrive later included. The first video of a site asks each player for permission.
Portal kiosk, front rightPortalKiosk.csThe button asks the world's script on the server to open a portal for the room, for 30 seconds (portals). It leads to La Guinguette on the official NodeWorld server: change targetServer and targetWorld on Kiosk Button. A portal opens only on a server, not in Play mode.
Light switch, front leftLightSwitch.csThe button turns the lamp on or off for everyone; the sign says who switched last.
Grab table, on the leftSyncedGrabbable.csThree cubes to grab and throw, at the same place for every player.
Ball launcher, next to youLauncher.csThe button throws a ball every player sees: a copy of the inactive Ball, which has a Network Template, spawned for the room; it goes after 10 seconds (spawned objects).
Pool, back leftWavyWater.csThe script makes the water's mesh and moves its waves every frame; you can walk on it (meshes made by scripts).
Dancing cubes, back rightDancers.cs64 cubes moved and colored by one object batch (object batches).

Each object with a script has the FL# Script component: its class, its Network Id when the script syncs the object or takes its ownership, and the values of its public fields. The world's NW World Config (NWWorldConfig.asset) lists the eight scripts in Flux Sharp Sources.

The world only uses what the SDK, URP and Unity bring: it opens in a new project with nothing else installed, and its scripts compile to one module for every platform.

Make it your world

  1. In NWWorldConfig.asset, set World Id (unique on the server that will host it) and Display Name.
  2. Change the scene and the scripts as you like.
  3. Publish it with the World Publisher.