File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1- #define ARRAY_WRITE_PERMISSIVE // Allow attempt to write "packed" byte array (calls WriteByteArray())
1+ #define ARRAY_WRITE_PERMISSIVE // Allow attempt to write "packed" byte array (calls WriteByteArray())
22#define ARRAY_RESOLVE_IMPLICIT // Include WriteArray() method with automatic type resolution
33#define ARRAY_WRITE_PREMAP // Create a prefixed array diff mapping
44#define ARRAY_DIFF_ALLOW_RESIZE // Whether or not to permit writing diffs of differently sized arrays
@@ -47,11 +47,13 @@ public void SetStream(Stream stream)
4747 /// <param name="value">The object to write</param>
4848 public void WriteObjectPacked ( object value )
4949 {
50- if ( value == null || value . GetType ( ) . IsNullable ( ) )
50+ bool isNull = value == null || ( value is UnityEngine . Object || ( ( UnityEngine . Object ) value ) == null ) ;
51+
52+ if ( isNull || value . GetType ( ) . IsNullable ( ) )
5153 {
52- WriteBool ( value == null ) ;
54+ WriteBool ( isNull ) ;
5355
54- if ( value == null )
56+ if ( isNull )
5557 {
5658 return ;
5759 }
You can’t perform that action at this time.
0 commit comments