Can pun and photo server be mixed?

If it can be used together, I want to know the advantages and disadvantages of this usage;And can you provide an official case

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @Eleven_Zhao,

    Thank you for choosing Photon!

    PUN is a Photon client SDK for Unity that connect to either Photon Cloud or your own self-hosted Photon Server(s).
    So yes they 'can be mixed'.
    See here on how to connect to your own server using PUN 2.
    This page has the showcase of games made using Photon Server (either using default LoadBalancing application that is running on Photon Cloud or a full blown custom app made from scratch).

    Differences between Photon Cloud and Photon Server are listed here.

    The main advantages / drawbacks:

    Photon Cloud:
    Pros:
    - no need to worry about hosting and maintaining servers
    - virtual application (AppId / AppVersion) support (other minor features not available in Photon Server)
    - gets fixes and enhancements frequently as opposed to server SDK releases
    Cons:
    - custom server side logic is based on custom plugins only which are available only for Enterprise Customers

    OnPremises Photon Server:
    Pros:
    - can be hosted locally (still require internet connection for licensing verification, offline licenses exist but they are not given to everyone)
    - total control over server logic
    - can be hosted near clients or in areas where Photon Cloud is unreachable
    Cons:
    - you need to handle hosting, scaling, configuration and all ops related stuff etc.

    now I will answer the questions you sent via message:
    I want to know if photoserver can instantiate GameObject into the room created by pun,And I wonder if photoserver can create rooms

    By default Photon Server can run all features provided in Photon Cloud.
    By default the Photon client is responsible for instantiating networked GameObjects and creating rooms.
    However you could initiate GameObject instantiation without a client request: this can be done via plugins but it's not available out of the box, you need to replicate PUN code into a plugin.
    You could also change server code to allow creating rooms from the server side, this is not available in the LoadBalancing application that is running on Photon Cloud and provided in the Photon Server SDK.

    I don't recommend that you go the custom app way, instead you could choose to self-host and make a custom plugin.
    Read more here about server plugins.
  • Can you provide a source code example based on the photoserver and pun?
  • JohnTube
    JohnTube ✭✭✭✭✭

    no

  • Is this plugin photoserver plug-in or do you need to write an instantiated plug-in?