We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88bdf8b commit 8e15dcfCopy full SHA for 8e15dcf
MLAPI/Serialization/BitReader.cs
@@ -208,7 +208,14 @@ public object ReadObjectPacked(Type type)
208
((IBitWritable)instance).Read(this.source);
209
return instance;
210
}
211
-
+
212
+ Type nullableUnderlyingType = Nullable.GetUnderlyingType(type);
213
214
+ if (nullableUnderlyingType != null && SerializationManager.IsTypeSupported(nullableUnderlyingType))
215
+ {
216
+ return ReadObjectPacked(nullableUnderlyingType);
217
+ }
218
219
throw new ArgumentException("BitReader cannot read type " + type.Name);
220
221
0 commit comments