Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

setVisibility

setVisibility<Given>(authority, entity, audience): boolean

Sets which pages hold entity at all: Audience.Everyone, the default; Audience.Owner; Audience.Nobody; one player; or the members of an audience entity. A page outside it is never sent the entity, its traits, its events or its key, and every reference to it reads null there, as a destroyed one’s does. It wins over interest, over Relevance.Always and over an attachment. A player entity takes none, by type: every page holds each player, and a hidden player hides the player’s control and the player’s presence instead. As Unity’s NetworkHide and Unreal’s IsNetRelevantFor, decided by the server.

Type Parameter
Given extends Entity
Parameter Type
authority EntityAuthority
entity NotPlayer<Given>
audience AudienceLike

boolean

setVisibility(step, marker, red);