Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Jim132 on December 16, 2018, 05:15:21 AM

Title: Is it good to attach several photon views on the player prefab?[SOLVED]
Post by: Jim132 on December 16, 2018, 05:15:21 AM
Hi, I'm new to playmaker, I mean I'm a newbie ;)

Recently I'm learning the playmaker with photon networking  ;D
And I'm learning that DemoWorker Demo  ;)

So, In the DemoWorker photon sample, there is only one photon view on the player prefab, and all the position, rotation and animation is synced by that one photon view by viewing one FSM.

I'm thinking is it ok to attach several photon views on my player prefab's children? For example, my character's body has two parts. It's upper body and lower body are two models, so I want to sync their animations seperately. So can I attach one photon view on the upper body to view it's position and rotation while attaching another photon view on the lower body to sync the lower body's position and rotation and animation?

If I can attach two photon views on one player prefab, is it good to do so? Or is it best to just have one photon view viewing one FSM so that it will use less bandwith?

Thanks for answering! PlayMaker is awesome! You guys are awesome! ❤  ;D
Title: Re: Is it good to attach several photon views on the player prefab?
Post by: jeanfabre on December 17, 2018, 01:16:01 AM
Hi,

It's theoritically possible yes.

but I would suggest the following: Make one fsm called "Network Data" with all the variable that needs to be synched or something and all other fsm will read and write to that fsm. This way you need only one photonview for your fsm data sync.

Bye,

 Jean
Title: Re: Is it good to attach several photon views on the player prefab?
Post by: Jim132 on December 17, 2018, 01:39:28 AM
Thank you very much! ;D