Player disappear, no errors or anything else happens

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 PUN.

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.

Player disappear, no errors or anything else happens

FrancescoQGaming
2021-04-15 14:52:22

Sometimes after the game starts, the player disappears from the game. No error appears, the game object is removed from the scene and nothing else happens.

mainPlayer = (GameObject)PhotonNetwork.Instantiate("playerName", Vector3.zero, Quaternion.identity);)

The player has a photon view and the only observed component is "PhotonRigidbodyView".
I checked the "Photon stats gui" and I have really low resends.
I have a photon view in my manager because I call some RPC from it. I don't know if it can produce some problems.
I don't know how to resolve that, does anyone have an idea regarding the cause?

Comments

FrancescoQGaming
2021-04-16 12:27:04

I back traced the destruction of the player and I found that photon calls "DestroyPlayerObjects", I don't know why. Is there a reason why photon calls that?

FrancescoQGaming
2021-04-16 12:54:28

The "DestroyPlayerObjects" is triggered by the Leave event, but I don't leave the room, it happens only at the beginning, when the player joins the room

FrancescoQGaming
2021-06-09 09:11:40

Resolved

Tobias
2021-06-09 11:07:09

Thanks for updating.
How did you resolve this?

FrancescoQGaming
2021-06-11 08:52:06

I have some sort of player position controller that controls which region of the world the players are in. If the player changes region, he will be disconnected from the current room and will join a new room for the new region. But I forgot to write some controls for this region change, so the player was disconnected from the room and then disappeared.

Back to top