コード例 #1
0
 protected override void OnSerializeView(ref RTStream stream)
 {
     if (stream.isWriting)
     {
         stream.Write(transform.position);
         stream.Write(transform.rotation);
     }
     else if (stream.isReading)
     {
         transform.position = stream.Read <Vector3>();
         transform.rotation = stream.Read <Quaternion>();
     }
 }
コード例 #2
0
 protected override void OnSerializeView(ref RTStream stream)
 {
     if(stream.isWriting)
     {
         stream.Write(transform.position);
         stream.Write(transform.localScale);
     }
     else
     {
         transform.position = stream.Read<Vector3>();
         transform.localScale = stream.Read<Vector3>();
     }
 }