[UNET] MethodAccessException SerializeItem in Unity.GeneratedNetworkCode

Hi,

I’ve got the following error when my SyncListBuffs.cs file is located in a different directory than the file that uses it. If I put them in one directory, everything works well. (Unity 5.3.2 f1)

How could I walk-around this issue?
Should I report it as a bug to Unity?
Should I submit a but to bitbucket unity\networking?

MethodAccessException: Method `MyNamespace.Common.Network.SyncListBuffs:SerializeItem (UnityEngine.Networking.NetworkWriter,MyNamespace.Common.Network.BuffStructure)' is inaccessible from method `Unity.GeneratedNetworkCode:_WriteStructSyncListBuffs_None (UnityEngine.Networking.NetworkWriter,MyNamespace.Common.Network.SyncListBuffs)'
namespace MyNamespace.Common.Network
{
    public class SyncListBuffs : SyncListStruct<BuffStructure>
    {
        protected override void SerializeItem(NetworkWriter writer, BuffStructure item)
        {
        ...
        }
        protected override BuffStructure DeserializeItem(NetworkReader reader)
        {
        ...
        }
}
namespace MyNamespace.Server
{
    public partial class FileThatUsesSyncListBuffs : NetworkBehaviour
    {
        public SyncListBuffs syncBuffList = new SyncListBuffs();
...
    }
}

Files’ structure is as follows (MyNamespace is set in Settings\Editor\RootNamespace):

Assets
–Common
----Network
------BuffStructure.cs
------SyncListBuffs.cs
–Server
----FileThatUsesSyncListBuffs.cs

Thanks a lot!

I think you should submit this as a bug (test first with the latest release / beta versions if you have time to see if it’s already solved though)

Arun