Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Unity 2022.2 is now available as the latest Tech release.
    Dismiss Notice
  3. We are making some changes to the DOTS forums.
    Dismiss Notice
  4. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Photon Fusion

Discussion in 'Multiplayer' started by ramonsmelo, Apr 5, 2022.

  1. JamesBriggs

    JamesBriggs

    Joined:
    Jul 4, 2022
    Posts:
    4
    Heya, I'm currently implementing a Session List in a lobby and have the OnSessionListUpdated callback working which works for sessions which are created when the app is running, but its not fetching the sessions that were created before the app started running. I can't seem to find any GetSessionList() method or anything like that to fetch the pre-existing session list on initial connection so cant really get an accurate session list, do you have any advice for this?

    Thanks,
    James
     
    Last edited: Aug 30, 2022
  2. emreboran

    emreboran

    Joined:
    Feb 13, 2022
    Posts:
    3
    Hi
    How can I synchronize data in fusion?
     
  3. ramonsmelo

    ramonsmelo

    Joined:
    Jul 31, 2017
    Posts:
    36
    We are going to double-check this.
    Thanks for your feedback.

    --
    Ramon Melo
    Photon Team
     
  4. ramonsmelo

    ramonsmelo

    Joined:
    Jul 31, 2017
    Posts:
    36
  5. JamesBriggs

    JamesBriggs

    Joined:
    Jul 4, 2022
    Posts:
    4
    Thanks Ramon! If there's any workaround you and the team can think of as well to get an pre-existing session list then I'm happy to hear any ideas too.

    Cheers,
    James
     
  6. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    2,945
    We release another sample: Fusion Golf

    The sample demonstrates an approach on how to create an arcade golf racing game with a focus on physics, using a server authoritative, client predicted model. It features a session browser as well as direct connecting via room codes. Hosts can modify various game settings such as max time per hole, max shots, whether or not players will collide with one another, and if the session is visible in the session browser. The sample has an 18 hole course with various physics-driven objects such as cannons, spinners, boost tunnels, and elevator platforms.
     
    Last edited: Aug 31, 2022
  7. JamesBriggs

    JamesBriggs

    Joined:
    Jul 4, 2022
    Posts:
    4
    Heya! I fixed my issue, turns out I was adding the callbacks for the OnSessionListUpdated after the lobby join, rather than between the runner creation and the lobby join, so it didnt get that initial call. Just thought i'd say here in case it helps anyone else, thanks for the help!

    Cheers,
    James
     
    ramonsmelo and Lukeesta like this.
  8. mohsin199236

    mohsin199236

    Joined:
    Dec 3, 2018
    Posts:
    2
    Hi, i am developing a simple racing game for WEBGL. I'm encountering some issues.

    -When testing on my own system with multiple instances game runs fine on 2/6/8 player modes, but when i test it with remote players it start giving me errors.
    -Issues frequency increases in 6 and 8 player modes. In 2 player mode issues rarely happen. And when testing(2 player mode) with remote desktop user, issues vanish.
    -Players disconnect randomly with different shutdown reasons each time. DisconnectedbyPluginLogic, PhotonCloudTimeout, Error.
    -Sometimes upon entering a session player is instantly disconnected.

    What i've done:

    -Optimized my scene to around 300 batches.
    -Tried changing protocol from udp to tcp and websocket.
    -Studied fusion kart project to see if i'm doing something wrong.
    -Refactored my code to avoid abnormal behaviors when a user disconnects mid race.

    Any form of help is appreciated.

    @ramonsmelo

    @tobiass WhatsApp Image 2022-10-06 at 3.01.55 PM (1).jpeg WhatsApp Image 2022-10-05 at 6.28.26 PM.jpeg WhatsApp Image 2022-10-06 at 3.01.55 PM.jpeg WhatsApp Image 2022-10-06 at 3.06.59 PM (1).jpeg
     
  9. ramonsmelo

    ramonsmelo

    Joined:
    Jul 31, 2017
    Posts:
    36
    @mohsin199236

    For support, please send an email to developer@photonengine.com

    In that email, please reply with the following:

    - Which SDK Build are you using?
    - Are you using Shared or ClientServer Mode?
    - The full logs from your clients.

    --
    Ramon Melo
    Photon Team
     
  10. mohsin199236

    mohsin199236

    Joined:
    Dec 3, 2018
    Posts:
    2
    How long does it takes to get a response from the email you mentioned? I already sent an email
     
  11. Ed-Musayelyan

    Ed-Musayelyan

    Joined:
    May 6, 2017
    Posts:
    1
    Hey guys! We are trying to implement host migration in our game and faced a problem with the host migration snapshot, which seems to contain only 1 networkObject no matter what.

    Our level loading flow, after the room is filled with players is like that:

    • Spawn gameplayContext (a network prefab with some top-level gameplay init logic) using Runner.Spawn
    • Load game level scene additively, then call RegisterSceneObjects for all scene networkObject
    • Spawn player character network objects for all players using Runner.Spawn
    So, this flow works fine and all the network objects are synced properly during gameplay. But now, when we are trying to implement host migration - the snapshot we receive always contains only 1 object (which is the first one spawned - gameplayContext, mentioned earlier).

    So, the main question is - why out migration snapshot does not include most of the loaded objects, despite those objects being synced properly before host migration happens?

    Maybe we missed some additional registration steps for those objects? Or do we need to call migration snapshot creation manually? (We are currently setting snapshot interval for 5 secs for testing purposes)

    We are using fusion 1.1.3 build 589
     
  12. JamesBriggs

    JamesBriggs

    Joined:
    Jul 4, 2022
    Posts:
    4
    Heya! I've got a vr app networked with Fusion Shared mode with meta avatars and about 30 grabbable objects with network transforms, It all works completely fine for about half an hour with ~10 people in it but then the network starts freezing up and stuff stops syncing or being able to be grabbed, suggesting lack of being able to access the network/request authorities. Are there any settings in the network project config that might be to do with this? Like it's exceeded the max amount of data or requests or something and locks up the server. It doesn't disconnect anyone from the server as it would do on an error, it just stops sending any new data or requests so it freezes everything up
     
  13. ramonsmelo

    ramonsmelo

    Joined:
    Jul 31, 2017
    Posts:
    36
    We usually reply within 24h, as it depends on the team timezone and if there is any holiday or weekend in the middle.

    --
    Ramon Melo
    Photon Team
     
  14. ramonsmelo

    ramonsmelo

    Joined:
    Jul 31, 2017
    Posts:
    36
    You should be able to get all your NetworkObject just fine.

    We suggest reading the Host Migration doc entry and the Sample code.
    • Can you check with the latest SDK Build 599?
    • When running the
      runner.GetResumeSnapshotNetworkObjects()
      in order to get the NO list, does it contain only 1 NO, in your case?
    • In order to get the list of Scene Objects, you must use
      runner.GetResumeSnapshotNetworkSceneObjects();
      instead. When running it, what do you get?
    --
    Ramon Melo
    Photon Team
     
    Ed-Musayelyan likes this.
  15. khanhdtc3599

    khanhdtc3599

    Joined:
    May 17, 2022
    Posts:
    1
  16. m00seCS

    m00seCS

    Joined:
    Jul 16, 2022
    Posts:
    1
    Is there a way to get Fusion to work for dedicated servers that don't communicate with Photon Cloud? Fusion looks appealing to us (we've even partially implemented it), but the ability for folks to set up offline LAN tournaments or community dedicated servers is important to the design of our game. Is support for that kind of thing planned?
     
  17. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    935
    No.
     
    m00seCS likes this.
  18. ramonsmelo

    ramonsmelo

    Joined:
    Jul 31, 2017
    Posts:
    36
    Communication with the Photon Cloud is mandatory.

    The Photon Cloud is also used for Matchmaking, connection handshake, as well as a relay service in case of direct connections are not possible.

    We do not have plans to make Fusion available in an offline format at the moment.

    --
    Ramon Melo
    Photon Fusion Team
     
    m00seCS likes this.