mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
parent
1045b1f2ed
commit
771f1fea13
@ -83,13 +83,13 @@ static MethodDefinition GenerateWriter(TypeReference variableReference, int recu
|
||||
|
||||
// check for invalid types
|
||||
|
||||
TypeDefinition VariableDefinition = variableReference.Resolve();
|
||||
if (VariableDefinition == null)
|
||||
TypeDefinition variableDefinition = variableReference.Resolve();
|
||||
if (variableDefinition == null)
|
||||
{
|
||||
Weaver.Error($"{variableReference.Name} is not a supported type. Use a supported type or provide a custom writer", variableReference);
|
||||
return null;
|
||||
}
|
||||
if (VariableDefinition.IsDerivedFrom(WeaverTypes.ComponentType))
|
||||
if (variableDefinition.IsDerivedFrom(WeaverTypes.ComponentType))
|
||||
{
|
||||
Weaver.Error($"Cannot generate writer for component type {variableReference.Name}. Use a supported type or provide a custom writer", variableReference);
|
||||
return null;
|
||||
@ -104,12 +104,12 @@ static MethodDefinition GenerateWriter(TypeReference variableReference, int recu
|
||||
Weaver.Error($"Cannot generate writer for {variableReference.Name}. Use a supported type or provide a custom writer", variableReference);
|
||||
return null;
|
||||
}
|
||||
if (VariableDefinition.HasGenericParameters)
|
||||
if (variableDefinition.HasGenericParameters)
|
||||
{
|
||||
Weaver.Error($"Cannot generate writer for generic type {variableReference.Name}. Use a supported type or provide a custom writer", variableReference);
|
||||
return null;
|
||||
}
|
||||
if (VariableDefinition.IsInterface)
|
||||
if (variableDefinition.IsInterface)
|
||||
{
|
||||
Weaver.Error($"Cannot generate writer for interface {variableReference.Name}. Use a supported type or provide a custom writer", variableReference);
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user