private void WriteStateful(NetDataWriter writer) { foreach (var kvp in world.statefulObjects) { if (arbiter || kvp.Value.Ownable.HasAuthority(remoteID)) { IStreamable streamable = kvp.Value.GetComponent <IStreamable>(); if (streamable != null) { writer.Put(kvp.Key); streamable.Write(writer); } } } }
private void WriteStateful(NetDataWriter writer) { foreach (var kvp in world.statefulObjects) { if (arbiter) { IStreamable streamable = kvp.Value.GetComponent <IStreamable>(); if (streamable != null) { writer.Put(kvp.Key); writer.Put(kvp.Value.Identity.GUID); streamable.Write(writer); } } } }
/// <summary> /// /// </summary> public virtual int Write(byte[] buffer, int offset, int count) { return(m_RawStream.Write(buffer, offset, count)); }