🌐

Photon PUN2のOnPhotonSerializeView()で送受信できる型一覧

に公開

はじめに

リファレンスに書いてある内容です。
Serialization in Photon | Photon Engine

Photonがサポートしている型

  • byte
  • bool
  • short
  • int
  • long
  • float
  • double
  • String
  • Object[]
  • byte[]
  • array
  • Hashtable
  • Dictionary

PUNがサポートしている追加の型

  • Vector2
  • Vector3
  • Quaternion
  • PhotonPlayer

それ以外の型を使いたい場合

SerializeMethodDeserializeMethodを定義してRegisterTypeをすれば、どの型でも扱えるようになる。

参考: 【Unity】僕もPhotonを使いたい #09 RPC() シリアライズ編 - うら干物書き

Discussion