How can I get the static resource like pictures and prefabs from the photon server?

server: photon server (self hosted) Loabalancing application
client: unity(2017.2.0) + PUN
Database: mysql
And I have completed the task about the server-client connection including database operations, and now I want to get the static resources like .jpg, .png or .prefab from the server and then the client can load the resouces. But I don't know how does the photon server support these actions? And if it support, how does I learn some api about the actions?


  • Hi, @hhhouwt

    There is no support for such operations in PhotonSocketServer. We provide communication API. If you need to load something from disk, or send to client some file, it is up to you.

  • Hello, @chvetsov ! Thanks for your apply, and I want to ask some detail for you.
    server: photon server(self hosted) LoadBalancing Application

    First, in the photon server introduction, it supports the HTTP, and I want to know if it allows the chrome client connection or Ajax connection like the Apache?

    Second, I want to get the AssetBundles from the web request using "UnityWebRequest.GetAssetBundle()", and that's why I always to try to connect the photon server using Http. And in the app.config of the LoadBalancing Application, the GameServer Setting property, I see the GamingHttpPath, GamingHttpPort and other properties for Client-to-Gameserver HTTPS connections(sorry, I don't know how to upload the picture…). So I think may it can work, and I want to ask you again…

    Hope for your reply!
  • hi, @hhhouwt

    Http support in PhotonSocketServer was not designed to implement file server. it is bad idea to keep game server and fileserver together. because your servers will be overloaded in case of update.

    Also Http is not best game protocol. use it only when there is no chance to use Udp or Tcp
    but if you like to implement http support use Owin, or just plain Http listener, or some open source implementation.

    I do not know how UnitWebRequest.GetAssetBundle works. so, i can not give you advise here.

Sign In or Register to comment.