Syncee
Listed API is shared between server and client. For server / client specific API, check their documentation.
Properties
buffer
Syncee.buffer: typeof(buffer)Wrapper table for the buffer library that automatically handles replication for buffers on the server
It exists for convenience. Using ReplicateBufferRegion is better as it lets you define the region to replicate rather than doing it per-write.
Functions
RegisterSchema
Syncee.RegisterSchema(name: string,serdes: Squish.SerDes<table>) → number?Registers a table schema for use in serializing replicated tables and returns the id of the schema. Same schemas should be registered on both server and client. Schemas are identified by name so order doesn't matter.
GetSchemaId
Syncee.GetSchemaId(name: string) → number?Returns id of the schema for use in SetSchema().
GetData
Returns the root replication table of the provided player.
On client, only returns that of the localplayer.
GetValueWithId
Syncee.GetValueWithId(id: number) → (table | buffer)?Returns the table or buffer associated with the provided id if present.
GetIdOfValue
Syncee.GetIdOfValue(t: table | buffer) → number?Returns id associated with the table or buffer if present.
IsReplicatedValue
Syncee.IsReplicatedValue(t: table | buffer) → booleanReturns boolean indicating if the table or buffer is replicated.
GetTableChangedSignal
Syncee.GetTableChangedSignal(t: table) → any--
This is properly typed in the package.
Returns signal that fires whenever any key of the replicated table changes.
GetBufferChangedSignal
Syncee.GetBufferChangedSignal(b: buffer) → any--
This is properly typed in the package.
Returns signal that fires whenever the content of the buffer changes.
WaitForValue
Syncee.WaitForValue(t: table,key: any,timeout: number?) → anyWaits until 'key' of the provided table is not nil, then returns the value.