Capture Room PhotonView Sync data (on DotNet non-Unity SDK)

edited May 2021 in DotNet
I'm looking to store/serialize all Transformation (and other PhotonView data) sync data for the whole game by one "Spectator Client".

I cannot find the reference to PhotonStream or anything alike in DotNet SDK - the parts that are available for Unity SDK seem to be at least partially missing.

Is there any interface to see all the room traffic in timestamped data for controlled replays and such - or is the only way to do it with Unity SDK?


  • I think I don't get the idea yet.

    It seems you use PUN 2, as you refer to PhotonViews. PUN 2 is made for Unity only. There is no pure .Net client for this and there is no in-depths explanation how any of it works.

    It does not support replays and we can't help much doing this, unless for concrete questions maybe.
  • I think you got most of it based on the answer.

    The .NET SDK and PUN 2 share the room and events. Obviously either/both can recognize the traffic in room; they can react to. PUN 2 seems to sync more data within the room than the .NET, and I was simply looking a way to grasp into that data.

    Even being able to detect/figure the metadata of the sync packages (not necessarily being able to extract the data) would be nice.

    But I suppose I'll dig closer to PUN 2 side of the stack. I can supposedly run Unity-based "Spectator Client" that would be able to read the data, as it could/would be running the same scene and participate in moving its entities according to the network sync data.
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited May 2021
    Hi @Kallex,

    I would first make sure the non PUN client can communicate with the PUN clients by setting proper AppVersion format and suffix.
    Second I would understand PUN code and copy parts of it (especially parsing incoming PUN specific events) into the non Unity client, since you target .NET then it would be more or less easy.
    There are additional custom types registered automatically in Unity by PUN.
    The difficult part is to port Unity specific code to .NET if that's needed.
  • Thanks, that's exactly what I did. Stumbled with the app version, but the clients are now in the same room just fine.

    Yeah also figured that I could grab the Unity specific code and see how far I can get it to go. There was PhotonStream handling that should be the key of getting the data on "Unity side".

    So I'll do that first before "giving up and moving to Unity side of the table" entirely.