Skip to main content

TestUnitySerializable

A class in Root.Township, the global namespace.

Network serialization test behaviour that sends its transform's position and rotation every write, with profiling timers.

Constructors​

MemberWhat it is
TestUnitySerializable()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

MemberWhat it is
static AccumulativeAverageCount prepareForWriteTimerStatic profiling timer for PrepareForWrite.
static AccumulativeAverageCount serializeTimerStatic profiling timer for Serialize.
1 private and internal field
MemberWhat it is
private uint fooUnused test value.

Properties​

MemberWhat it is
int MaximumBits { get; }Always 250.
2 private and internal properties
MemberWhat it is
private AccumulativeAverageCount Alta.Networking.INetworkSerialized.PrepareForWriteTimer { get; }Returns the shared prepareForWriteTimer.
private AccumulativeAverageCount Alta.Networking.INetworkSerialized.SerializeTimer { get; }Returns the shared serializeTimer.

Methods​

2 private and internal methods
MemberWhat it is
private bool Alta.Networking.INetworkSerialized.PrepareForWrite(bool isWriteFull)Always returns true, so it writes every time.
private void Alta.Networking.INetworkSerialized.Serialize(Stream stream, bool isWriteFull)Reads or writes the position and rotation and applies them to the transform.