Fishnet V4.5.5R.Pro
I have an inventoryslot class which simply has two integers.
public class SyncInventorySlot2
{
public int itemID; // Item ID
public int stacksize;
public SyncInventorySlot2()
{
itemID = -1;
stacksize = -1;
}
public SyncInventorySlot2(int id, int stack)
{
itemID = id;
stacksize = stack;
}
}
I then create a synclist of InventorySlot2 type, and everything syncs perfectly fine, with no custom synctype being used:
[AllowMutableSyncType]
public SyncList<SyncInventorySlot2> inventoryList = new SyncList<SyncInventorySlot2>(new SyncTypeSettings()
{
ReadPermission = ReadPermission.OwnerOnly,
WritePermission = WritePermission.ServerOnly
});
However, when I attempt to create a custom synctype for it and put it in a synclist, these two integers are no longer recognized properly. What am I doing wrong?
Attached is my custom synctype code.