From 3579b869805b822e0bd71897fd37db745b56c91f Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Perrier Date: Thu, 8 Apr 2021 18:59:19 +0200 Subject: [PATCH] Add WriteCommonValue support. --- Source/Editor/Utilities/Utils.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Source/Editor/Utilities/Utils.cs b/Source/Editor/Utilities/Utils.cs index 4d4d8adb7..ea0bbb843 100644 --- a/Source/Editor/Utilities/Utils.cs +++ b/Source/Editor/Utilities/Utils.cs @@ -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"));