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
In NGO 1.5.1, NetworkVariableSerialization.Read(reader, ref key) takes ref rather than out. Network Dictionary should be updated to something like:
public override void ReadField(FastBufferReader reader)
{
m_Keys.Clear();
m_Values.Clear();
reader.ReadValueSafe(out ushort count);
for (int i = 0; i < count; i++)
{
var key = new TKey();
var value = new TValue();
NetworkVariableSerialization<TKey>.Read(reader, ref key);
NetworkVariableSerialization<TValue>.Read(reader, ref value);
m_Keys.Add(key);
m_Values.Add(value);
}
}
The text was updated successfully, but these errors were encountered:
` public override void ReadField(FastBufferReader reader)
{
m_Keys.Clear();
m_Values.Clear();
reader.ReadValueSafe(out ushort count);
for (int i = 0; i < count; i++)
{
TKey key = new TKey();
TValue value = new TValue();
NetworkVariableSerialization<TKey>.Read(reader, ref key);
NetworkVariableSerialization<TValue>.Read(reader, ref value);
m_Keys.Add(key);
m_Values.Add(value);
}
}`
I'm no expert on these, but I've changed to this in multiple places according to Rider's IntelliSense - got rid of the errors but no idea if this is the solution.
In NGO 1.5.1, NetworkVariableSerialization.Read(reader, ref key) takes ref rather than out. Network Dictionary should be updated to something like:
The text was updated successfully, but these errors were encountered: