playMaker

Author Topic: Photon Automatically Sync  (Read 5272 times)

SeriousRPG

  • Playmaker Newbie
  • *
  • Posts: 45
Photon Automatically Sync
« on: August 30, 2015, 06:47:04 PM »
Hi,
When I look at the demo for Photon (the non Playmaker version), there is a line added in the Menu (on Awake)
        // this makes sure we can use PhotonNetwork.LoadLevel() on the master client and all clients in the same room sync their level automatically
        PhotonNetwork.automaticallySyncScene = true;

In the playmaker demo I don't see this being set and there is no playmaker action for it. Do I need to set it?

Is there a way in Playmaker to have one player in one scene and the other player in another scene? (inside a building for example.) If so how do I manage that? (my second guy leaves the scene when the first guy goes out the door, but after that neither can see eachother - I think the syncscene would fix that, but that isn't really what I am after anyways.)

Thanks

Sandi

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon Automatically Sync
« Reply #1 on: August 31, 2015, 03:59:13 AM »
Hi,

No, I don't use this feature on the demo as it's not needed for that demo, because there is only one scene for the room.

You can have different players in different rooms but that's going to be on each instances, Unity can not be in two different scene at one time. Your example of a building made up of several scenes is totally ok to do in Photon, your players can be all in the same Photon Room on the server and be in different part of your scenes, or even have different scenes loaded asynchronously or completyl switched to other scenes, it doesn't matter for Photon, as long as networkids are respected ( which they are by default).

so in your case, you don't want this to be set to true, and o leave it has is I would say.

 If you need, I can build the custom action to let you setup this option. But indeed, this is not what you want for your case.

I think that in your case you are doing something wrong, like maybe actually joining a totally different room, that's likely the problem.

Are you loaded a new scene completly or adding it additively?


 Bye,

 Jean

SeriousRPG

  • Playmaker Newbie
  • *
  • Posts: 45
Re: Photon Automatically Sync
« Reply #2 on: August 31, 2015, 12:50:46 PM »
I am loading a new scene completely (not async). (I am using Unity 4.6 Free). My people are definately  in the same room and appear fine together in the first scene. It is only after I move person 1 out of the first scene that person 2 leaves the scene and goes to the new scene but doesn't see anyone. I think my message queue may be messed up at that point or the messages are non flowing properly (maybe it is because I don't have automatic sync set up). My RPC Chat calls show they are in the same scene (as does my inspector and my "friends" list).

My second scene is very large, so I used different scenes to separate inside/outside because with the free version I don't get benefit of LOS and my draw calls are crazy-high as it is. If I move the inside of the building to the same scene it gets worse. One solution would be upgrading to 5.0 (which I will eventually do - Maybe it is time now...)

Sandi

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon Automatically Sync
« Reply #3 on: September 02, 2015, 01:29:41 AM »
Hi,

 Ahh, yes of course, it's your message queue, make sure that when you load a new scene you keep all the proxy and player alive, this will help. you don't want to interrupt the Player connection just because you move to another scene.

 Bye,

 Jean