Model
self:get_syncer
SharedRetrieves 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
| Type | Name | Description |
|---|---|---|
int | peer_id | Peer id that syncs this model, 0 when the server itself is the syncer |
Examples
core.model.load("character", "models/character.glb")
local entity = core.model.create("character")
core.engine.print("info", "Syncer:", entity:get_syncer())