playMaker

Author Topic: Is it good to attach several photon views on the player prefab?[SOLVED]  (Read 1045 times)

Jim132

  • Playmaker Newbie
  • *
  • Posts: 6
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
« Last Edit: December 17, 2018, 04:30:31 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Is it good to attach several photon views on the player prefab?
« Reply #1 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

Jim132

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Is it good to attach several photon views on the player prefab?
« Reply #2 on: December 17, 2018, 01:39:28 AM »
Thank you very much! ;D