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! Your search result can be found below. Plus, we offer support via 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.

NullReferenceException on StartGame

thetoeb
2022-02-11 13:46:34

Hello!

I wanted to start using Photon Fusion today and walked through the Getting Started section. I simply got the latest version (Photon-Fusion-0.13.0-RC-Nightly-406) on Unity version 2021.1.6f1 and also installed mono.cecil to a fresh 3d hdrp project. I created my AppId and used the wizard to store it. I simply almost copy and pasted the "Fusion 102 - Setting Up A Scene - Launching Fusion"-Code. But after "_launcher.StartGame" is called, NullReferenceException was thrown and the NetworkRunner shuts down.

Exceptions:

Even if i use the Feature "Fusion -> GameObject -> Setup Basic Fusion Scene" without my own Scripts/GameObjects, the same errors occur.

All my scenes are added to the Build-Settings aswell.

My code, but as i said, the same thing:

I hope someone can help me with this issue.

Best regards

Comments

Tobias
2022-02-11 16:09:36

It would be good to see the complete callstack of the error.

I would suggest to update the Fusion SDK to latest. While I don't see if one of the fixes helps in this case, there are several.

Last but not least, we will double check our Getting Started doc with the latest version.

thetoeb
2022-02-11 16:24:50

Thanks for answering. I asked this some days ago, so in the mean time it "resvolved" itself (Posts are taking long time for being approved..)

For anybody wondering: It was an actual bug in the NetworkRunner, there was an incorrect null-check at the AddBehavior method. But Version 0.13.0 Build 408 (and above i hope) fixes that problem. Build 406 only got this issue.

Tobias
2022-02-11 16:27:44

Sometimes our devs are too busy and forget to check the forum.

Thanks for your update! Glad you checked out the updated SDK.

Back to top