Model

self:get_syncer

Shared

Retrieves the peer id currently holding sync authority over the model

Syntax

local peer_id = self:get_syncer()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
intpeer_idPeer id that syncs this model, 0 when the server itself is the syncer

Examples

Get the syncer of a model
core.model.load("character", "models/character.glb")

local entity = core.model.create("character")

core.engine.print("info", "Syncer:", entity:get_syncer())

On this page