Managers
Managers in Verza's SDK provide a powerful way to interact with various world elements, control the flow of your scripts, and build complex interactions. They are used to perform actions, retrieve information, and modify the game state according to your requirements.
🗃️ EngineManager
7 items
🗃️ AnimationsManager
4 items
🗃️ AssetsManager
1 items
🗃️ AudioManager
8 items
🗃️ ChatManager
4 items
🗃️ ClothesManager
4 items
🗃️ CommandsManager
2 items
🗃️ EffectsManager
6 items
🗃️ EntitiesManager
2 items
🗃️ Misc
1 items
🗃️ NetworkManager
12 items
🗃️ ObjectManager
44 items
🗃️ ObjectsManager
6 items
🗃️ PlayerManager
41 items
🗃️ PlayersManager
4 items
🗃️ ProximityActionManager
3 items
🗃️ StorageManager
4 items
🗃️ UIManager
28 items
🗃️ VoicechatManager
3 items
🗃️ WorldManager
24 items
EngineManager
Methods
Method | Description |
---|---|
engine.connectServer | Connects a websocket server script to a Verza server instance. |
engine.connectClient | Connects a client script to a Verza server instance. |
engine.restartServer | Restarts the server instance. |
engine.setForwardMessages | Enables or disables message forwarding to scripts. |
engine.requestResourcesCheck | Requests a resources check. |
engine.areResourcesReady | Checks if the resources are ready. |
engine.destroy | Cleans up and releases engine resources. |
Properties
Name | Type | Description |
---|---|---|
engine.network | NetworkManager | Manages network connections and communication. |
engine.api | ApiManager | Handles Verza's requests and responses. |
engine.ui | UIManager | Manages UI elements and interactions. |
engine.chat | ChatManager | Handles in-game chat functionality. |
engine.commands | CommandsManager | Manages command registration and execution. |
engine.camera | CameraManager | Controls camera settings and transitions. |
engine.streamer | StreamerManager | Manages the streaming of objects and assets. |
engine.world | WorldManager | Controls world properties and environment settings. |
engine.assets | AssetsManager | Manages assets loading and caching. |
engine.events | EventsManager | Engine's events manager. |
engine.params | EngineParams | Holds engine configuration parameters. |
engine.localPlayer | PlayerManager | A reference to the local player object. |
engine.players | PlayersManager | The manager for players. |
engine.objects | ObjectsManager | The manager for objects. |
engine.localPlayerId | number | The ID of the local player. |
engine.connected | boolean | True if the engine is currently connected. |
engine.synced | boolean | True if the engine is currently synced. |
engine.isServer | boolean | True if the script is running on the server. |
engine.isClient | boolean | True if the script is running on the client. |
engine.chunkSize | number | The size of the chunks used for streaming. |
engine.syncPlayers | boolean | Indicates if player data is being synced. |
engine.syncPlayerUpdatesPriority | boolean | Determines the priority of player updates syncing. |
engine.syncPlayerUpdates | boolean | Indicates if player updates are being synced. |
engine.syncPlayerControls | boolean | Indicates if player controls are being synced. |
engine.syncCameraPosition | boolean | Indicates if camera position is being synced. |
AssetsManager
Methods
Method | Description |
---|---|
assets.upload | Uploads a file to Verza's servers to be used as an asset in your script. |
AudioManager
Methods
Method | Description |
---|---|
audio.addSound | Add a sound to the engine. |
audio.removeSound | Remove a sound from the engine. |
audio.createSound | Create a sound. |
audio.createPlayerSound | Create a sound attached to a player. |
audio.createObjectSound | Create a sound attached to an object. |
audio.playSound | Play a sound and automatically dispose of it when it's done playing. |
audio.playSoundAtPosition | Play a sound and automatically dispose of it when it's done playing at a specific position. |
SoundManager
Properties
Name | Type | Description |
---|---|---|
sound.id | string | Sound ID. |
sound.name | string | Sound name. |
Methods
Method | Description |
---|---|
sound.play | Play the sound. |
sound.pause | Pause the sound. |
sound.resume | Resume the sound. |
sound.stop | Stop the sound. |
sound.setVolume | Set the sound volume. |
sound.setPlaybackRate | Set the sound playback rate. |
sound.setLoop | Set the sound loop. |
sound.setLoopStart | Set the sound loop start. |
sound.setLoopEnd | Set the sound loop end. |
sound.setPosition | Set the sound position. |
sound.setMinDistance | Set the sound minimum distance to start to fade out. |
sound.setMaxDistance | Set the sound maximum distance to fade out. |
sound.setRolloffFactor | Set the sound rolloff factor. |
sound.setOptions | Set the sound options. |
sound.destroy | Destroy the sound. |
EffectsManager
Methods
Method | Description |
---|---|
effects.createParticles | Create a particle effect. |
effects.createPlayerParticles | Create a particle effect attached to a player. |
effects.createObjectParticles | Create a particle effect attached to an object. |
effects.playParticles | Play a particle effect. |
effects.playParticlesAtPosition | Play a particle effect at a specific position. |
ParticlesManager
Properties
Name | Type | Description |
---|---|---|
particles.id | string | Particle effect ID. |
Methods
Method | Description |
---|---|
particles.play | Play the particle effect. |
particles.pause | Pause the particle effect. |
particles.stop | Stop the particle effect. |
particles.resume | Resume the particle effect. |
particles.setPosition | Set the particle effect position. |
particles.setOptions | Set the particle effect options. |
particles.destroy | Destroy the particle effect. |
ProximityActionManager
Properties
Name | Type | Description |
---|---|---|
proximityAction.id | string | Proximity action ID. |
Methods
Method | Description |
---|---|
on | Listen for proximity action triggered events. |
off | Stop listening for proximity action triggered events. |
proximityAction.destroy | Destroy the proximity action. |
AnimationsManager
Methods
Method | Description |
---|---|
animations.addAnimations | Adds animations to the engine. |
animations.getAnimation | Gets an animation by id. |
animations.getAnimations | Gets all animations. |
animations.removeAnimation | Removes an animation by id. |
CameraManager
Properties
Name | Type | Description |
---|---|---|
camera.camera | PerspectiveCamera | The camera object. |
camera.position | Vector3 | The position of the camera. |
camera.rotation | Euler | The rotation of the camera. |
camera.quaternion | Quaternion | The quaternion of the camera. |
ClothesManager
Methods
Method | Description |
---|---|
clothes.addClothe | Adds a clothe item to the engine. |
clothes.removeClothe | Removes a clothe item from the engine. |
clothes.addSkinMask | Adds a skin mask to the engine. |
clothes.removeSkinMask | Removes a skin mask from the engine. |
ChatManager
Methods
Method | Description |
---|---|
chat.setEnabled | Enables or disables the chat for the server. |
chat.escapeText | Escapes special characters in a message so that they are displayed correctly in the chat. |
chat.sendMessageToAll | Sends a message to all players in the server. |
chat.sendMessageTo | Sends a message to a specific player in the server. |
UIManager
Properties
Name | Type | Description |
---|---|---|
ui.interfaces | string[] | An array of the interfaces currently being displayed on the UI |
Methods
Method | Description |
---|---|
ui.show | Shows the UI. |
ui.hide | Hides the UI. |
ui.setProps | Sets the size properties of the UI. |
ui.addInterface | Adds an interface to the UI. |
ui.removeInterface | Removes an interface from the UI. |
ui.hasInterface | Checks whether the interface has been added to UI. |
ui.toggleInterface | Toggles whether an interface is added or not. |
ui.showCursor | Shows the cursor. |
ui.hideCursor | Hides the cursor. |
ui.toggleCursor | Toggles the locked status of the cursor. |
ui.showIndicator | Shows a loading indicator on the UI. |
ui.hideIndicator | Hides the loading indicator on the UI. |
ui.addToolbar | Adds a toolbar to the UI. |
ui.removeToolbar | Removes a toolbar from the UI. |
ui.addMainToolbarItem | Adds a toolbar item to the main toolbar. |
ui.removeMainToolbarItem | Removes a toolbar item from the main toolbar. |
ui.isCursorShown | Checks whether the cursor is shown. |
ui.removeAllInterfaces | Removes all interfaces from the UI. |
ui.openUrl | Opens a URL in a new tab. |
ui.goToServer | Goes to a server. |
ui.isSystemMenu | Checks whether the current interface is any System Menu. |
ui.isPlayersList | Checks whether the current interface is the Players List. |
ui.isOptionsMenu | Checks whether the current interface is the Options Menu. |
ui.isServerMenu | Checks whether the current interface is the Server Menu. |
ui.isComponentShown | Checks whether a UI component is shown. |
ui.toggleComponent | Toggles the visibility of a UI component. |
ui.showComponent | Shows a UI component. |
ui.hideComponent | Hides a UI component. |
InputManager
Properties
Name | Type | Description |
---|---|---|
input.cursorLock | boolean | A boolean that indicates whether or not the cursor is locked to the game window. |
input.isActiveInput | boolean | A boolean that indicates whether or not a text input field is currently active for the player. |
input.activeInput | HTMLInputElement | The HTML input element that is currently active relative to the script. |
CommandsManager
Properties
Name | Type | Description |
---|---|---|
commands | Map<string, Command> | The list of registered commands. |
noAccessMessage | string | The message displayed when a user tries to execute a command but doesn't have permission to do so. |
Methods
Method | Description |
---|---|
register | Registers a command or action. |
unregister | Unregisters a command or action. |
EntitiesManager
Properties
Name | Type | Description |
---|---|---|
entities.type | EntityType | The type of entity managed by the entity manager. |
entities.entities | EntityManager[] | An array containing all the entity managers for the specified entity type. |
entities.entitiesMap | Map<ID, EntityManager> | A map of entity managers indexed by their respective entity IDs. |
entities.streamed | Map<ID, EntityManager> | A map of entity managers for entities that are currently being streamed to the player. |
entities.events | EventsManager | An instance of the EventsManager class used to register and manage events for the specified entity type. |
Methods
Method | Description |
---|---|
entities.is | Checks whether an entity with the specified ID exists. |
entities.get | Retrieves the entity with the specified ID. Returns null if the entity does not exist. |
NetworkManager
Properties
Method | Description | |
---|---|---|
network.server | ServerDto | An object containing information about the server the player is currently connected to. |
Methods
Method | Description |
---|---|
network.emitToPlayer | Emit an event to a specific player on the server. |
network.emitToPlayers | Emit an event to all players on the server. |
network.emitToPlayersWithAccess | Emit an event to players with specific access on the server. |
network.emitToPlayersWithRoles | Emit an event to players with specific roles on the server. |
network.emitToScripts | Emit an event to all scripts on the server. |
network.emitToServer | Emit an event to the server. |
network.onPlayerEvent | Register a listener function to be called when a player event is emitted. |
network.offPlayerEvent | Unregister a listener function previously registered with onPlayerEvent . |
network.onServerEvent | Register a listener function to be called when a server event is emitted. |
network.offServerEvent | Unregister a listener function previously registered with onServerEvent . |
network.onScriptEvent | Register a listener function to be called when a script event is emitted. |
network.offScriptEvent | Unregister a listener function previously registered with onScriptEvent . |
ObjectsManager
Properties
Name | Type | Description |
---|---|---|
objects.entities | ObjectManager[] | An array containing all the object managers. |
objects.entitiesMap | Map<ID, ObjectManager> | A map of ObjectManager indexed by their respective object IDs. |
objects.streamed | Map<ID, ObjectManager> | A map of ObjectManager for entities that are currently being streamed to the player. |
objects.events | EventsManager | An instance of the ObjectManager class used to register and manage events. |
objects.editingObject | ObjectManager | A reference to the object manager for the object currently being edited, or null if no object is being edited. |
Methods
Method | Description |
---|---|
objects.create | Creates a new object with the specified properties. |
objects.resolve | Retrieves an object by its ID and returns a reference to the corresponding object manager. |
objects.edit | Begins editing the specified object. |
objects.cancelEdit | Cancels editing of the current object. |
objects.setEditSnaps | Enables or disables snap offset while editing objects. |
objects.setEditAxes | Enables or disables the display of translation, rotation and scaling axes while editing objects. |
ObjectManager
Properties
Name | Type | Description |
---|---|---|
object.id | string | The ID of the object. |
object.vars | [Map<string, any> ] | A map of variables that can be used to store local data for the object. |
object.visible | string | Whether the object is visible or not. |
object.attachedTo | ObjectManager | The object that this object is attached to, or null if this object is not attached to anything. |
object.attachedEntities | Set<EntityManager> | The entities attached to the object, represented as a set of EntityManager instances. |
object.objectType | ObjectType | The type of the object. |
object.location | Object3D | The object's position, rotation, and scale. |
object.position | Vector3 | The object's position. |
object.rotation | Quaternion | The object's rotation. |
object.quaternion | Quaternion | The object's quaternion. |
object.scale | Vector3 | The object's scale. |
object.worldLocation | Promise<Object3D> | A promise that resolves to the world location of the object. |
object.worldPosition | Vector3 | The world position of the object. |
object.worldQuaternion | Quaternion | The world quaternion of the object. |
object.worldScale | Vector3 | The world scale of the object. |
object.permanent | boolean | Whether the object is permanent or not. |
object.remote | boolean | Whether the object is remote or not. |
object.parentId | string | The ID of the parent object. |
object.parent | ObjectManager | The parent object of this object, or null if this object has no parent. |
object.children | Set<ObjectManager> | The child objects of this object, represented as a set of ObjectManager instances. |
object.userData | ObjectUserData | Custom user data attached to the object. |
object.props | ObjectProps | The properties of the object, based on its type. |
object.data | ObjectData | The data of the object. |
object.supportsCollision | boolean | Whether the object supports collision or not. |
object.collision | EntityCollisionType | The collision type of the object. |
object.collider | EntityColliderType | The collider type of the object. |
object.supportsShadows | boolean | Whether the object supports shadows or not. |
object.shadows | boolean | Whether the object casts shadows or not. |
object.supportsBloom | boolean | Whether the object supports bloom or not. |
object.bloom | boolean | Whether the object has bloom or not. |
object.sensor | boolean | Whether the object is a sensor or not. |
object.mass | number | The object's mass, used in physics calculations. |
object.friction | number | The object's friction, used in physics calculations. |
object.restitution | number | The object's restitution, used in physics calculations. |
object.enabledRotations | Boolean3Array | Whether the object's rotations are enabled or not. |
object.enabledTranslations | Boolean3Array | Whether the object's translations are enabled or not. |
object.sound | SoundManager | The object's sound manager when used the sound property (React SDK only). |
object.particles | ParticlesManager | The object's particles manager when used the particles property (React SDK only). |
object.proximityAction | ProximityActionManager | The object's proximity action manager when used the proximityAction property. (React SDK only) |
Methods
Method | Description |
---|---|
object.attach | Attaches an entity to the object. |
object.detach | Detaches an entity from the object. |
object.detachFromParent | Detaches the object from its parent. |
object.setPosition | Set the position of the object. |
object.setRotation | Set the rotation of the object. |
object.setScale | Set the scale of the object. |
object.setVisible | Set whether or not the object is visible. |
object.setData | Update data for the object. |
object.setProps | Updates type-specific properties for an object. |
object.setPositionFromWorldSpace | Set the position of the object in world space. |
object.setRotationFromWorldSpace | Set the rotation of the object in world space. |
object.setShadows | Enable or disable shadows for the object. |
object.setBloom | Enable or disable bloom for the object. |
object.setCollision | Set the collision type of the object. |
object.setCollider | Set the collider type of the object. |
object.setMass | Set the mass of the object. |
object.setFriction | Sets the friction of the physics object. |
object.setRestitution | Sets the restitution of the physics object. |
object.setEnabledRotations | Sets which rotations are enabled for the physics object. |
object.setEnabledTranslations | Sets which translations are enabled for the physics object. |
object.computeBoundingBox | Compute the bounding box of the object. |
object.computeWorldBoundingBox | Compute the world bounding box of the object. |
object.rerender | Forces an object to re-render. |
object.isStreamed | Checks if an object is currently being streamed. |
object.waitForStream | Waits for an object to finish streaming. |
object.setLinearVelocity | Sets the linear velocity of the object. |
object.setAngularVelocity | Sets the angular velocity of the object. |
object.applyImpulse | Applies an impulse to the object. |
object.addTorque | Adds torque to the object. |
object.applyTorqueImpulse | Applies an impulse torque to the object. |
object.startTransitions | Starts all active transitions for the object. |
object.startTransition | Starts a transition for the object. |
object.clearTransitions | Clears all active transitions for the object. |
object.createSound | Creates a sound attached to the object. |
object.createParticles | Creates a particle effect attached to the object. |
object.createProximityAction | Creates a proximity action attached to the object. |
object.toData | Converts an object to its corresponding data representation. |
object.clone | Creates a new object by cloning an existing object with the same properties. |
object.setHelper | Enables or disables the helper for the object. |
object.sync | Synchronizes an object's properties between the server and the client. |
object.save | Saves an object to the Verza servers, making it permanent. |
object.saveVolatile | Same as object.save but with a delay. |
object.delete | Destroys and deletes an object from Verza servers (only for permanent objects). |
object.destroy | Destroys an object. |
PlayersManager
Properties
Name | Type | Description |
---|---|---|
players.entities | PlayerManager[] | An array containing all the player managers. |
players.entitiesMap | Map<ID, PlayerManager> | A map of PlayerManager indexed by their respective player IDs. |
players.streamed | Map<ID, PlayerManager> | A map of PlayerManager for players that are currently being streamed to the player. |
players.events | EventsManager | An instance of the EventsManager class used to register and manage events. |
Methods
Method | Description |
---|---|
players.create | Creates a detached player entity. |
players.forEachInChunk | Iterates for each player in specified chunk. |
players.setNametagsDistance | Sets the nametags distance for all players. |
players.setStreamerDistance | Sets the streamer distance for all players. |
PlayerManager
Properties
Name | Type | Description |
---|---|---|
player.id | number | The player's ID. |
player.vars | [Map<string, any> ] | A map of variables that can be used to store local data for the player. |
player.visible | string | Whether the player is visible or not. |
player.attachedTo | ObjectManager | The object that this player is attached to, or null if this player is not attached to anything. |
player.attachedEntities | Set<EntityManager> | The entities attached to the player, represented as a set of EntityManager instances. |
player.isAdmin | boolean | Whether the player is an admin or not. |
player.location | Object3D | The player's position and rotation. |
player.position | Vector3 | The player's position. |
player.rotation | Quaternion | The player's rotation. |
player.quaternion | Quaternion | The player's quaternion. |
player.velocity | Vector3 | The player's velocity vector. |
player.worldPosition | Vector3 | The player's world position. |
player.worldRotation | Quaternion | The player's world rotation. |
player.worldQuaternion | Quaternion | The player's world quaternion. |
player.name | string | The player's name. |
player.state | PlayerState | The player's current state. |
player.roles | string[] | The roles assigned to the player. |
player.controls | PlayerControls | The player's controls. |
player.isMovingControl | boolean | Whether the player's movement controls are active. |
player.onGround | boolean | Whether the player is currently on the ground. |
player.camera | PlayerCameraManager | The player's camera manager. |
player.voicechat | PlayerVoicechatManager | The player's voicechat manager. |
Methods
Method | Description |
---|---|
player.attach | Attaches an entity to the player. |
player.detach | Detaches an entity from the player. |
player.detachFromParent | Detaches the player from its parent. |
player.setName | Sets the player's name. |
player.setNametagColor | Sets the player's nametag color. |
player.setDimension | Sets the player's dimension. |
player.setPosition | Sets the player's position. |
player.setRotation | Sets the player's rotation. |
player.getFacingAngle | Gets the player's facing angle. |
player.setFacingAngle | Sets the player's facing angle. |
player.setCameraBehind | Sets the player's camera to be behind them. |
player.sendMessage | Sends a message to the player. |
player.setMovements | Sets the player's movement controls. |
player.setTranslations | Sets the player's translation axes. |
player.setLinearVelocity | Sets the player's linear velocity. |
player.setClimbAngle | Sets the player's maximum climb angle. |
player.setVisible | Set whether or not the player is visible. |
player.sendSuccessNotification | Sends a success notification to the player. |
player.sendErrorNotification | Sends an error notification to the player. |
player.hasAccess | Checks if the player has access to a certain command or action. |
player.hasRole | Checks if the player has a role. |
player.addRole | Adds a role to the player. |
player.removeRole | Removes a role from the player. |
player.addClothes | Adds clothes to the player. |
player.getClothes | Gets the player's clothes. |
player.removeClothes | Removes clothes from the player. |
player.playAnimation | Plays an animation on the player. |
player.stopAnimation | Stops an animation on the player. |
player.stopAnimations | Stops all animations on the player. |
player.pauseAnimation | Pauses an animation on the player. |
player.resumeAnimation | Resumes an animation on the player. |
player.ban | Bans the player. |
player.unban | Unbans the player. |
player.getBanStatus | Gets the player's ban status. |
player.kick | Kicks the player. |
player.setChatEnabled | Sets the player's chat enabled status. |
player.createSound | Creates a sound attached to the player. |
player.createParticles | Creates a particle effect attached to the player. |
player.createProximityAction | Creates a proximity action attached to the player. |
player.camera.setFov | Sets the camera fov for the player. |
player.camera.setMode | Sets the camera mode for the player. |
player.camera.startTransitions | Starts transitions for the camera. |
player.camera.startTransition | Starts a transition for the camera. |
player.camera.stopTransitions | Stops transitions for the camera. |
player.camera.setPosition | Sets the position of the camera. |
player.voicechat.setPlayerToPlayerMode | Sets the voicechat mode to player to player. |
player.voicechat.enableChannel | Enables a voicechat channel. |
player.voicechat.disableChannel | Disables a voicechat channel. |
player.voicechat.setMuted | Sets the player's muted status. |
player.voicechat.setDistance | Sets the player's voicechat distance. |
StorageManager
Methods
Method | Description |
---|---|
storage.getPersistentStore | Gets a persistent store. |
storage.getMemoryStore | Gets a memory store. |
PersistentStoreManager
Methods
Method | Description |
---|---|
store.set | Sets a value in the store. |
store.get | Gets a value from the store. |
store.delete | Deletes a value from the store. |
store.getList | Gets a list from the store. |
MemoryStoreManager
Methods
Method | Description |
---|---|
store.set | Sets a value in the store. |
store.get | Gets a value from the store. |
store.delete | Deletes a value from the store. |
VoicechatManager
Methods
Method | Description |
---|---|
voicechat.setEnabled | Sets the global voicechat status. |
voicechat.setMode | Sets the global voicechat mode. |
voicechat.setDistance | Sets the global voicechat distance. |
WorldManager
Methods
Method | Description |
---|---|
world.getTime | Gets the current time of day. |
world.setTime | Sets the current time of day. |
world.setTimeMode | Sets the time mode. |
world.setTimeCycleDuration | Sets how long a day/night cycle lasts in seconds. |
world.setTimezone | Sets the timezone. |
world.setHemisphereLightColor | Sets the color of the hemisphere light. |
world.setHemisphereLightGroundColor | Sets the color of the ground hemisphere light. |
world.setHemisphereLightIntensity | Sets the intensity of the hemisphere light. |
world.setGlobalLightColor | Sets the color of the global light. |
world.setGlobalLightIntensity | Sets the intensity of the global light. |
world.setGlobalLightAzimuth | Sets the azimuth of the global light. |
world.setInteriorModeEnabled | Enable or disable the interior mode. |
world.setSkybox | Sets the current skybox. |
world.setWeather | Sets the current weather. |
world.setMoonPhase | Sets the current moon phase. |
world.setSkyManualModeEnabled | Sets whether the sky transitions are manual or automatic according to the time of day. |
world.setViewportRender | Sets the world viewport render mode. |
world.createProximityAction | Creates a proximity action. |
world.createPlayerProximityAction | Creates a proximity action attached to a player. |
world.createObjectProximityAction | Creates a proximity action attached to an object. |
world.setFogEnabled | Sets the fog status. |
world.setFogColor | Sets the fog color. |
world.setFogDensity | Sets the fog density. |
RaycasterManager
Methods
Method | Description |
---|---|
raycaster.raycastScreenPoint | Casts a ray from a point on the screen and returns the hit information. |
raycaster.raycastPoint | Casts a ray from a origin and a direction in the world and returns the hit information. |
raycaster.raycastPoints | Casts rays from two positions in the world and returns hit information. |
Misc
Methods
Method | Description |
---|---|
createControllerManager | Creates a controller manager. |