Headless Server

The whole answer can be found below.

Please note: The Photon forum is closed permanently. After many dedicated years of service we have made the decision to retire our forum and switch to read-only: we've saved the best to last! And we offer you support through these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on Fusion.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Headless Server

Wobbles67
2022-05-11 17:26:31

Hi,

I have followed the Fusion 100, tried all the examples and even created my own client host small examples. However, when it comes to the Headless Server example I am totally lost.

The example gives no indication of how the project needs to be structured. Are the Server and Clients completely separate builds? If they're separate, how on earth does a client connect to the scene defined in the headless server? Does the client need to use the same NetworkRunner defined in the server, if so how do you access it? Which one creates the rooms/sessions, the client or the server?

The client host makes perfect sense as the host and clients all use the same NetworkRunner and everything's in the same build, but I just can't get my head around the headless server sample. Can anyone give any more guidance on project structure and how a client connects to it?

Thanks for any help.

Comments

Wobbles67
2022-05-11 21:58:48

Okay, I have figured out the answer to at least two of my own questions:

  • You need two separate Apps, one for the Headless Server and one for the Clients connecting. Both must use the same App ID from your Fusion Dashboard.

  • The NetworkRunners are completely independent.

Run the Headless Server example (you can add a SessionName if you want but it defaults to a random value).

Run the client and call JoinSessionLobby(SessionLobby.ClientServer)

This will show the headless server as a session you can join.

Hope this helps others struggling with this.

Wobbles67
2022-05-15 07:47:08

Still looking for answers on how scene management should be handled when using a dedicated server. Still trying to work it out for myself, but haven't found a solution yet...

zdt11
2022-05-29 13:21:44

I'm in the same boat. I see from the discord there is a Dedicated Server Code / Docker / Orchestration sample on the way hopefully this week, so my plan is to do testing with player-as-host instead of spending days guessing at how to get a minimal topology up and running. Definitely seems odd that Fusion is touted as being built with dedicated server in mind with no clear path for new users to make it happen at the outset, but I guess it's all still new.

Wobbles67
2022-05-29 22:50:16

I managed to learn a bit more by taking a look at the KCC Add-on code. It has an option to start as just a server. It's hidden away in there but it tells you more than the useless headless server example does.

ramonmelo
2022-07-19 15:20:19

Hi,

Please take a look at our doc pages:

--

Ramon Melo

Photon Fusion Team

Afterlife17071
2022-11-30 03:51:05

Is there an example of this type of project structure with fusion it's weird i can't see any example

Back to top