mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Weaver.ResolveField moved to Resolvers
This commit is contained in:
parent
abdc6b8e56
commit
539d2515b4
@ -125,5 +125,17 @@ public static GenericInstanceMethod ResolveMethodGeneric(TypeReference t, Assemb
|
||||
Weaver.fail = true;
|
||||
return null;
|
||||
}
|
||||
|
||||
public static FieldReference ResolveField(TypeReference tr, AssemblyDefinition scriptDef, string name)
|
||||
{
|
||||
foreach (FieldDefinition fd in tr.Resolve().Fields)
|
||||
{
|
||||
if (fd.Name == name)
|
||||
{
|
||||
return scriptDef.MainModule.ImportReference(fd);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
@ -1034,18 +1034,6 @@ static bool ProcessNetworkBehaviourType(TypeDefinition td)
|
||||
return false;
|
||||
}
|
||||
|
||||
public static FieldReference ResolveField(TypeReference t, string name)
|
||||
{
|
||||
foreach (FieldDefinition fd in t.Resolve().Fields)
|
||||
{
|
||||
if (fd.Name == name)
|
||||
{
|
||||
return scriptDef.MainModule.ImportReference(fd);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static MethodReference ResolveProperty(TypeReference t, string name)
|
||||
{
|
||||
foreach (var fd in t.Resolve().Properties)
|
||||
|
Loading…
Reference in New Issue
Block a user