Add WriteCommonValue support.

This commit is contained in:
Jean-Baptiste Perrier
2021-04-08 18:59:19 +02:00
parent 3f39212b7b
commit 3579b86980

View File

@@ -1121,6 +1121,21 @@ namespace FlaxEditor.Utilities
stream.Write(asRay.Direction.Y);
stream.Write(asRay.Direction.Z);
}
else if (value is Int2 asInt2)
{
stream.Write((byte)19);
stream.Write(asInt2);
}
else if (value is Int3 asInt3)
{
stream.Write((byte)20);
stream.Write(asInt3);
}
else if (value is Int4 asInt4)
{
stream.Write((byte)21);
stream.Write(asInt4);
}
else
{
throw new NotSupportedException(string.Format("Invalid Common Value type {0}", value != null ? value.GetType().ToString() : "null"));