Skip to content

Commit

Permalink
feat: #869 support structs in other assemblies (#1022)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulpach authored and miwarnec committed Aug 12, 2019
1 parent bbe4ac8 commit 62d1887
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions Assets/Mirror/Editor/Weaver/Processors/SyncVarProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -284,19 +284,6 @@ public static void ProcessSyncVars(TypeDefinition td, List<FieldDefinition> sync
return;
}

string fieldModuleName = resolvedField.Module.Name;
if (fieldModuleName != Weaver.CurrentAssembly.MainModule.Name &&
fieldModuleName != Weaver.UnityAssembly.MainModule.Name &&
fieldModuleName != Weaver.NetAssembly.MainModule.Name &&
fieldModuleName != Weaver.CorLibModule.Name &&
fieldModuleName != "System.Runtime.dll" && // this is only for Metro, built-in types are not in corlib on metro
fieldModuleName != "netstandard.dll" // handle built-in types when weaving new C#7 compiler assemblies
)
{
Weaver.Error($"{fd} has invalid type. Use a type defined in the same module {fd.Module}");
return;
}

if (fd.FieldType.IsArray)
{
Weaver.Error($"{fd} has invalid type. Use SyncLists instead of arrays");
Expand Down

0 comments on commit 62d1887

Please sign in to comment.