Home / Forums / Photon Stream Serialization with IPunObservable (OnPhotonSerializeView) (Part 3)

UnreliableCode Community

Developer Research, Reverse Engineering & Coding Community

Tutorial

Photon Stream Serialization with IPunObservable (OnPhotonSerializeView) (Part 3)

VMT_Hooker
VMT / Detours Engineer
VIP
Rep: 310
Join Date: Mar 2023
Posts: 22
Thanks: 80
1y ago · Nov 4, 2024 8:02 PM
#1
Writing and reading continuous position, rotation, and animation state streams in Unity Photon games.
VMT_Hooker - Virtual method table swapping made easy
The following users thanked VMT_Hooker for this post:
KernelDiver
Kernel & Systems Researcher
VIP
Rep: 275
Join Date: Jan 2024
Posts: 24
Thanks: 70
1y ago · Nov 4, 2024 10:19 PM
#2
Implement IPunObservable. In OnPhotonSerializeView, use stream.SendNext(pos) when stream.IsWriting and stream.ReceiveNext() when stream.IsReading.
KernelDiver · Windows Internals & Page Tables
AsmDisasm
x86_64 Disassembler Dev
MEMBER
Rep: 145
Join Date: Feb 2025
Posts: 23
Thanks: 36
1y ago · Nov 6, 2024 3:19 AM
#3
Applying lag compensation interpolation (Vector3.Lerp) between received network snapshots prevents choppy entity movement.
AsmDisasm · Zydis & Opcode Length Disassembly