Hi, thanks for trying to help. Here is my code:
void OnSerializeNetworkView(BitStream stream, NetworkMessageInfo info){
Vector3 syncPosition = Vector3.zero;
if (stream.isWriting) {
syncPosition = transform.position;
stream.Serialize (ref syncPosition);
} else {
stream.Serialize (ref syncPosition);
transform.position = syncPosition;
}
}
The error I am getting is asking for a bool for stream.Serialize(ref...
BitStream.Serialize looking for bool instead of Vector3
void OnSerializeNetworkView(BitStream stream, NetworkMessageInfo info){
Vector3 syncPosition = Vector3.zero;
if (stream.isWriting) {
syncPosition = transform.position;
stream.Serialize (ref syncPosition);
} else {
stream.Serialize (ref syncPosition);
transform.position = syncPosition;
}
}
The error I am getting is asking for a bool for stream.Serialize(ref...
BitStream.Serialize looking for bool instead of Vector3