Fixes and improvements

This commit is contained in:
Wojciech Figat
2021-11-18 11:21:30 +01:00
parent 2a2b70f83f
commit cdcb2f8f7a
15 changed files with 46 additions and 48 deletions

View File

@@ -288,7 +288,7 @@ namespace FlaxEditor.Utilities
case VariantType.Matrix: return new ScriptType(typeof(Matrix));
case VariantType.Array: return new ScriptType(typeof(object[]));
case VariantType.Dictionary: return new ScriptType(typeof(Dictionary<object, object>));
case VariantType.ManagedObject: return new ScriptType(typeof(object));
case VariantType.ManagedObject: return ScriptType.Object;
case VariantType.Blob: return new ScriptType(typeof(byte[]));
default: throw new ArgumentOutOfRangeException($"Unknown Variant Type {variantType} without typename.");
}
@@ -541,6 +541,15 @@ namespace FlaxEditor.Utilities
stream.Write(int.MaxValue);
stream.WriteStrAnsi(type.FullName, 77);
break;
case VariantType.Array:
if (type != typeof(object[]))
{
stream.Write(int.MaxValue);
stream.WriteStrAnsi(type.FullName, 77);
}
else
stream.Write(0);
break;
default:
stream.Write(0);
break;