playMaker

Author Topic: Photon Network Connect Manually  (Read 6070 times)

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 713
    • Flashing Lights
Photon Network Connect Manually
« on: April 06, 2016, 01:16:50 PM »
Hello,

Anyone have an experience with «PhotonNetworkConnectManually» action?
Or how do you make it so a user can choose a server/region?
I had Best Region with «ConnectUsingSettings» action and this works, but I can't control where to join.
Any tips would be appreciated.

I am on Unity 5.2.2 with Playmaker 1.7.8.4 and Photon 1.66 (Free)

Thanks!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon Network Connect Manually
« Reply #1 on: April 06, 2016, 02:38:20 PM »
Hi,

 I haven't provided support for this within the PlayMaker bridge for Photon.

 Let me study this and see how much there is to provide this ability.

https://doc.photonengine.com/en/realtime/current/reference/regions
https://doc-api.photonengine.com/en/pun/current/class_photon_network.html

Bye,

 Jean

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 713
    • Flashing Lights
Re: Photon Network Connect Manually
« Reply #2 on: April 12, 2016, 09:26:03 AM »
Hi, Thank you for looking at this!

For now I will just force everybody to join on the same region as I don’t understand the scripting side of this ::) No rush at the moment.

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 713
    • Flashing Lights
Re: Photon Network Connect Manually
« Reply #3 on: December 10, 2016, 02:54:34 PM »
Bump

Hi, had time to look at this?
How does it look, will there be a bridge to Connect Manually?

Thank you!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon Network Connect Manually
« Reply #4 on: December 12, 2016, 02:17:23 AM »
Hi,

 not yet, Let me do that this week. Thanks for the reminder!

 Bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon Network Connect Manually
« Reply #5 on: December 14, 2016, 02:32:10 AM »
Hi,

 actually, it's done, the action is called "PhotonNetworkConnectManually". you don't have it?

Bye,

 Jean

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 713
    • Flashing Lights
Re: Photon Network Connect Manually
« Reply #6 on: December 14, 2016, 08:37:22 AM »
Hi, thanks for looking at it.

Yes the action was there all the time, but never seen it working. Was looking for advice how to set it up if I’m doing it wrong and from your post i understood that it is not supported.

I am trying to connect to Photon Cloud chosen region instead of Best, would appreciate a tip how to do it.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon Network Connect Manually
« Reply #7 on: December 15, 2016, 02:31:42 AM »
Hi,

 For this you should use the Photon settings themselves right? that's not possible in your case?

 What do you mean by "chosen". Usually the default connection is doing just that no?

Bye,

 Jean
« Last Edit: December 15, 2016, 03:16:18 AM by jeanfabre »

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 713
    • Flashing Lights
Re: Photon Network Connect Manually
« Reply #8 on: December 15, 2016, 03:13:28 AM »
Hi,

Yes I can change regions manually in Photon Settings and it works, so I can force everybody to join in specific region. Or I can set connect to Best Region so Photon auto connects to fastest connection.

What I want to do, is create a menu with options to which region to join, so the player can play together with friends abroad.
If set to Best Region, there are cases when people won’t meet as they are on other server, but if I manually force everyone to one server, that is not optimal for those who would just play in his closes region.

Is this idea correct or am I overthinking something here?

I took and tried to implement ConnectManually action and never had a successful connection.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon Network Connect Manually
« Reply #9 on: December 15, 2016, 03:18:26 AM »
Hi,

 ok, that make sense. What you need is ConnectToRegion actually. We'll do the action for tomorrow.

 Bye,

 Jean



600

  • Beta Group
  • Hero Member
  • *
  • Posts: 713
    • Flashing Lights
Re: Photon Network Connect Manually
« Reply #10 on: December 15, 2016, 03:30:47 AM »
Awesome, thank you, much appreciated!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon Network Connect Manually
« Reply #11 on: December 15, 2016, 04:00:28 AM »
Hi,
 
Ok, it's up on the Ecosystem. Can you give it a go and let me know if it works for you.

 Bye,

 Jean

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 713
    • Flashing Lights
Re: Photon Network Connect Manually
« Reply #12 on: December 15, 2016, 05:27:57 AM »
Wow that was fast!
At first I could not find it in Photon Unity5 package, but it was in Unity4’s, so I set everything to None and imported ConnectToRegion only and it works!! Tested with all regions.

Thank you again for the awesome support, have a great day!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon Network Connect Manually
« Reply #13 on: December 19, 2016, 02:38:19 AM »
Hi,

 yeah, I forgot to push the U5 version... but this morning I did an update again as Photon 1.80 is out, so now it's both properly updated for Unity 4 and 5 on the Ecosystem.

 Bye,

 Jean