playMaker

Author Topic: Network Variable  (Read 2058 times)

edufurla

  • Junior Playmaker
  • **
  • Posts: 56
Network Variable
« on: October 14, 2015, 11:10:45 AM »
I am trying do something very simple using Playmaker Network, but I can't figure out what I am doing wrong.
I have a string var with Network Sync enable and Playmaker in the Network view.
When I change this var in server instance, all clients can see the change, but when I change this var in a client instance, the server do not update the var. The variable changes only happen from server to client.
Is it possible a client change a global var or only the server can do it?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Network Variable
« Reply #1 on: October 15, 2015, 08:25:43 AM »
Hi,

 that's a interesting question. What server are you using? I never ran a Unity server, so I can't help you here.

 I would make sense actually, since otherwise it would be clashing, that a client can set a global var, all clients would then have race condition trying to all set the global variable.

Bye,

 Jean

edufurla

  • Junior Playmaker
  • **
  • Posts: 56
Re: Network Variable
« Reply #2 on: October 15, 2015, 10:15:31 AM »
I am using the standard Playmaker Network example scene whit a little addition.
I have a button to set a variable to a value and a ugui text that show me this var.
I start the server and connect the client.
If I press the button on server instance the var changes on client, but if I press the button on client instance nothing happens on server or other clients.


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Network Variable
« Reply #3 on: October 16, 2015, 07:32:33 AM »
Hi,

 Can you send the scene as a package. I'll repro here. But basically it seems actually logical as a behavior.

Bye,

 Jean