Skip to main content

UFloatBytes

A internal struct in Alta.Serialization.Runtime, Alta.Serialization. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.

Internal helper that sends a float as its raw 32 bits.

Fields​

3 private and internal fields
MemberWhat it is
private static readonly float[] floatValueStatic one-float buffer for the byte copy.
private static UFloatBytes instanceUnused default instance.
private static readonly uint[] intValueStatic one-uint buffer for the byte copy.

Methods​

MemberWhat it is
static void Serialize(ref float value, Stream stream)Copies the float's bytes into a uint and serializes that, then back on read. Uses static buffers, so it is not thread safe.