Photon Completely Broken After Editor Crash
Options
anarki1
✭
Hello
So my editor crashed, for the first time ever. My game was working fine before the crash. I could click the start game on my room menu, it would instantiate a PlayerManager for each player connected, and the PlayerManager would instantiate a PlayerController for every player to control. But after I started the editor after the crash, two problems occurred (and yes, I checked all my GameObjects and prefabs, no data or progress was lost). The first problem was that the PlayerManager would instantiate, but the PlayerManager would not instantiate a PlayerController. What's even weirder is that I have to test the game around 4 times and then it just starts working. Second problem is that when I build my game and connect to the same room as my editor, the Photon only instantiates one PlayerManager for all the players. One PlayerManager means only one PlayerController for everyone, essentially breaking the game and rendering it unplayable. I've checked all my code, my code is fine. I've reimported all my assets. I would greatly appreciate your help, this problem is very frustrating. Also if you need it, I can attach my code for my PlayerManager. I am using PUN 2 Free btw.
So my editor crashed, for the first time ever. My game was working fine before the crash. I could click the start game on my room menu, it would instantiate a PlayerManager for each player connected, and the PlayerManager would instantiate a PlayerController for every player to control. But after I started the editor after the crash, two problems occurred (and yes, I checked all my GameObjects and prefabs, no data or progress was lost). The first problem was that the PlayerManager would instantiate, but the PlayerManager would not instantiate a PlayerController. What's even weirder is that I have to test the game around 4 times and then it just starts working. Second problem is that when I build my game and connect to the same room as my editor, the Photon only instantiates one PlayerManager for all the players. One PlayerManager means only one PlayerController for everyone, essentially breaking the game and rendering it unplayable. I've checked all my code, my code is fine. I've reimported all my assets. I would greatly appreciate your help, this problem is very frustrating. Also if you need it, I can attach my code for my PlayerManager. I am using PUN 2 Free btw.
0
Comments
-
I would try isolating these two scripts and mocking their code a little bit to work with an empty project and PUN, then you can isolate the issue and know where the problem is.0
-
PhotonUser wrote: »I would try isolating these two scripts and mocking their code a little bit to work with an empty project and PUN, then you can isolate the issue and know where the problem is.
ill try that out too. but remember, it worked before the crash, so it shouldnt be the script. but ill check it out anyways, thanks.0 -
PhotonUser wrote: »I would try isolating these two scripts and mocking their code a little bit to work with an empty project and PUN, then you can isolate the issue and know where the problem is.
something very strange has happened. I did what you told me, and I decided to make a new, empty project and test my scripts there. For some reason, the inspector will not read public gameobjects and other variables. Here is a picture for example:
Neither SerializeField works, not public works. And yes, I have saved the script and reimported it.0 -
I would try reinstaling that unity version.0
-
Hi @anarki1,
Thank you for choosing Photon!
Maybe you have a custom editor script created and forgotten for Launcher class?
@PhotonUser thanks for choosing Photon and your help also.0 -
Hi @anarki1,
Thank you for choosing Photon!
Maybe you have a custom editor script created and forgotten for Launcher class?
@PhotonUser thanks for choosing Photon and your help also.
I am not really that advanced into unity, so I don't know what custom editor scripts are and how to make them. So it most likely isn't that.0 -
PhotonUser wrote: »I would try reinstaling that unity version.
There's no other way? Reinstalling unity seems kind of extreme, but if that is the only fix then i'll do it.0 -
In the code, find all references to Launcher. Check if there is a editor script that acts as inspector for it.
That should have an attribute[CustomEditor(Launcher)]
.0 -
I left unity for a while because I was getting pissed from all these errors. I'm back with a fresh reinstall and it seems to be working fine now. Now I can finally get back into game development 😁
Thank you all for your help
1