Hi,
@Swift_Illusion: We tried to port the demoWorker shipped with the Photon as much as possible in playmaker, and we're glad that it works just as well indeed! It's also allow playmaker to shine and demonstrate how flexible and powerful Fsm's are.
@justifun:
not off topic, unity and photon networking are similar, Photon did a great job making sure the vocabulary and concepts are inlines, while adding this cloud server that simply make it all work like charm...
So, to answer your question: If you observe a cube transform, you will effectivly synch the transform, it will not synch everything that make up this gameObject ( mesh, material, components, fsm states and actions etc etc), for this you will need to observe the Fsm component hosting the color variable and make sure you have ticked "network sync" on that color variable, then you need to learn about the "ownership" concepts of a network view.
This may sound as a cumbersome way of dealing with this, but this is a way to optimize network usage, by only passing the information that really changes.
When you observe something with a networkView component, one of the instance running within the network as to be the owner. For this use the following action:
https://hutonggames.fogbugz.com/default.asp?W803If the network view "is Mine" it means this is the owner and you ought to set the color variable, other instances running on the network will return false to the test, because they are slaved to the owner, and they ought to read, and react to the variable change. That is they should set the material color to reflect the new color, but only the owner is setting the Color variable and slaves simply need to read it.
Having said this, you need to be very careful with synching:
If the variable you want to synch changes all the time, I mean really all the time, like a player movements, or a bullet position, then it's perfectly acceptable to read and write every frame to maintain maximum accuracy within the game.
IF the variable only changes from time to time, you should not use synching much, because this takes bandwidth and will slow down the game synchronization. Instead use the "sendRemoteEvent" action
https://hutonggames.fogbugz.com/default.asp?W805This effectively send an event across the network, and it means that you don't take up bandwidth at all. So if you want to change the color only when the user is customizing his character, this is perfect, use remove Events, if the color changes as part of the game dynamics and frequently, then you can use variable synch.
Hope that makes more sense now.
Bye,
Jean