OnPhotonSerializeView is never called issue
Options
Hallo,
I try to use a PhotonView, but the OnPhotonSerializeView is never called.
The Class I use is called DrawController and is a Component of Prefab DrawCanvas
I searched and found a lot of similar issues, but I checked all the things I could find:
1. The script I use does use Photon. MonoBehavior
2. I drew the Script component on the PhotonView Observed Component directly from the GameObject itself
3. I implemented the Method in the Script
4. The Prefab is located in Resources Folder
5. I Instantiate it via the Photon.Instantiate method
6. I always test with 2 other players with the same build
7. Logging in to the room, instantiating the Object etc., all works fine, I can see it on all clients
8. I tested stand-alone and WebGL
9. I tested with all three Observe options (I still don't get what would trigger "on change")
Still the Method was not called once (I would see the Debug.Log("Test Serialize View!"); )
I could not find anything else, that could cause the issue... Do I miss something?
Best regards
Mario
I try to use a PhotonView, but the OnPhotonSerializeView is never called.
The Class I use is called DrawController and is a Component of Prefab DrawCanvas
I searched and found a lot of similar issues, but I checked all the things I could find:
1. The script I use does use Photon. MonoBehavior
2. I drew the Script component on the PhotonView Observed Component directly from the GameObject itself
3. I implemented the Method in the Script
4. The Prefab is located in Resources Folder
5. I Instantiate it via the Photon.Instantiate method
6. I always test with 2 other players with the same build
7. Logging in to the room, instantiating the Object etc., all works fine, I can see it on all clients
8. I tested stand-alone and WebGL
9. I tested with all three Observe options (I still don't get what would trigger "on change")
Still the Method was not called once (I would see the Debug.Log("Test Serialize View!"); )
I could not find anything else, that could cause the issue... Do I miss something?
Best regards
Mario
0
Comments
-
Hi @DerTolleIgel,
sorry for the late response. Did you find a solution meanwhile?
I have created a test for myself using the information you have shared with us and the test worked for me. So I can't see any issue with your set up (as far as I have knowledge about it).
Can you tell us which version of PUN and Unity you are using? Maybe we have some unknown compatibility issues. And furthermore can you share a repro project so I can take a look directly at the issue?0 -
Hi,
it works now. But to be honest, I don't know what I changed. I played around and suddenly it worked.
But thanks for trying, this was very confusing. If I find out, what initially caused that behavior, I will share it.0 -
I guess you just tried to play a single player mode.
OnPhotonSerializeView is called when there are 2 or more players in a room.
Hope my guess is right.0