Scripting / Reference
Storage
Types in the ParelVR.Volt.Storage namespace.
VoltAchievements#
ParelVR.Volt.Storage.VoltAchievements static
Achievements of this world for the local player, kept in their storage for the world.
VoltAchievements methods#
Checks an achievement; the request's Exists is true when it is unlocked.
Unlocks an achievement; the first time, the player sees a notification with the title.
VoltLeaderboard#
ParelVR.Volt.Storage.VoltLeaderboard static
High score boards of this world, kept in its world storage. The answer arrives as OnStorageResult; its Value is the board as JSON: {"lowerIsBetter", "entries": [{"id", "name", "score"}]}, best first, at most 100 entries, one per player.
VoltLeaderboard methods#
Reads a board.
Records the local player's score on a board, keeping their best one.
VoltStorage#
ParelVR.Volt.Storage.VoltStorage static
Data that outlives the session, kept by ParelVR's own backend. Keys are up to 64 letters, digits, dots, dashes and underscores; values are text up to 64 KB. A script can only reach the local player's data.
VoltStorage methods#
Removes a key.
Checks whether a key has a value.
Reads the value of a key.
Stores text under a key.
VoltStorageRequest#
ParelVR.Volt.Storage.VoltStorageRequest class
A storage request in progress. Yield it in a coroutine to wait for the result, or override OnStorageResult on the behaviour that started it.
VoltStorageRequest properties#
Why the request failed.
Whether the key has a value, after a Get or an Exists.
True once the request has finished.
The key of the request.
True when the request did what was asked.
The stored text, after a Get. An empty string when there is none.
VoltStorageScope#
ParelVR.Volt.Storage.VoltStorageScope enum
Whose data a storage key belongs to.
| Value | Meaning |
|---|---|
World (0) |
One value for the whole world, shared by every visitor in every instance. |
Player (1) |
The local player's data, shared by every world of the same creator. |
PlayerWorld (2) |
The local player's data in this world only. |
Instance (3) |
Data of this instance. It is gone when the instance closes. |
