You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LogHelper.LogWarning("BitReader canot find the GameObject sent in the SpawnedObjects list, it may have been destroyed. NetworkId: "+networkId.ToString());
LogHelper.LogWarning("BitReader canot find the NetworkedObject sent in the SpawnedObjects list, it may have been destroyed. NetworkId: "+networkId.ToString());
LogHelper.LogWarning("BitReader canot find the NetworkedBehaviour sent in the SpawnedObjects list, it may have been destroyed. NetworkId: "+networkId.ToString());
174
+
returnnull;
175
+
}
176
+
}
177
+
if(typeof(IBitWritable).IsAssignableFrom(type))
131
178
{
132
179
objectinstance=Activator.CreateInstance(type);
133
180
((IBitWritable)instance).Read(this.source);
134
181
returninstance;
135
182
}
136
-
if(type.IsEnum)
137
-
returnReadInt32Packed();
138
183
139
184
thrownewArgumentException("BitReader cannot read type "+type.Name);
thrownewArgumentException("BitWriter cannot write GameObject types that does not has a NetworkedObject component attached. GameObject: "+((GameObject)value).name);
163
+
}
164
+
else
165
+
{
166
+
WriteUInt32Packed(networkedObject.NetworkId);
167
+
}
168
+
return;
169
+
}
170
+
elseif(valueisNetworkedObject)
171
+
{
172
+
if(value==null)
173
+
{
174
+
thrownewArgumentException("BitWriter cannot write NetworkedObject types with a null value");
0 commit comments