ParelVRDocs
Player site

Scripting / Reference

Scene

Types in the ParelVR.Volt.Scene namespace.

VoltScene#

ParelVR.Volt.Scene.VoltScene static

The objects of the world scene.

Properties#

static VoltGameObject[] RootObjects { get; }

The objects at the top of the world's hierarchy.

Methods#

static void Destroy(VoltGameObject target)

Destroys a world object at the end of the frame.

static void Destroy(VoltGameObject target, float delay)

Destroys a world object after a delay in seconds.

static VoltGameObject Find(string path)

Finds an object by name or by a path from the top of the hierarchy, such as "Room/Door". Inactive objects are found too.

static VoltGameObject[] FindWithTag(string tag)

Every active object with a tag. At most 256.

static VoltGameObject Instantiate(VoltGameObject original)

Makes a copy of a world object. The copy exists on this client only.

static VoltGameObject Instantiate(VoltGameObject original, VoltTransform parent)

Makes a copy of a world object under a parent.

static VoltGameObject Instantiate(VoltGameObject original, Vector3 position, Quaternion rotation)

Makes a copy of a world object at a position.

static void Switch(string sceneName)

Moves the local player into another scene of this world: a subroom. Every scene in the world's Build Profiles scene list is uploaded with the world, so nothing downloads, and the player stays in the same instance. Players in other subrooms are neither seen nor heard. "MainScene" goes back to the scene players arrive in.