Skip to content

Client Side

Alexander edited this page Apr 8, 2018 · 5 revisions

Data.Set()

Params

  • int - id
  • string - key
  • object - value
Client.Sync.Data.Set(GetPlayerServerId(PlayerId()), "name", "Test Name");

Data.Reset()

Params

  • int - id
  • string - key
Client.Sync.Data.Reset(GetPlayerServerId(PlayerId()), "name");

Data.Get()

Params

  • int - id
  • string - key
  • int - waitMs (Optional), how long client wait callback on the server
var name = await Client.Sync.Data.Get(GetPlayerServerId(PlayerId()), "name");

Data.Has()

Params

  • int - id
  • string - key
  • int - waitMs (Optional), how long client wait callback on the server
bool hasName = await Client.Sync.Data.Has(GetPlayerServerId(PlayerId()), "name");

Work only client side (It is not sync data)

Data.SetLocally()

Params

  • int - id
  • string - key
  • object - value
Client.Sync.Data.SetLocally(GetPlayerServerId(PlayerId()), "name", "Test Name");

Data.ResetLocally()

Params

  • int - id
  • string - key
Client.Sync.Data.ResetLocally(GetPlayerServerId(PlayerId()), "name");

Data.GetLocally()

Params

  • int - id
  • string - key
  • int - waitMs (Optional), how long client wait callback on the server
var name = Client.Sync.Data.GetLocally(GetPlayerServerId(PlayerId()), "name");

Data.HasLocally()

Params

  • int - id
  • string - key
  • int - waitMs (Optional), how long client wait callback on the server
bool hasName = Client.Sync.Data.HasLocally(GetPlayerServerId(PlayerId()), "name");

Clone this wiki locally