mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
MonoBehaviourProcessor - switch (#211)
This commit is contained in:
parent
86a11f4761
commit
9dc5ab96a0
@ -67,28 +67,27 @@ void ProcessMethods()
|
||||
|
||||
var attrName = ca.Constructor.DeclaringType.ToString();
|
||||
|
||||
if (attrName == "Mirror.ServerAttribute")
|
||||
switch (attrName)
|
||||
{
|
||||
Log.Error("Script " + m_td.FullName + " uses the attribute [Server] on the method " + md.Name + " but is not a NetworkBehaviour.");
|
||||
Weaver.fail = true;
|
||||
}
|
||||
else if (attrName == "Mirror.ServerCallbackAttribute")
|
||||
{
|
||||
Log.Error("Script " + m_td.FullName + " uses the attribute [ServerCallback] on the method " + md.Name + " but is not a NetworkBehaviour.");
|
||||
Weaver.fail = true;
|
||||
}
|
||||
else if (attrName == "Mirror.ClientAttribute")
|
||||
{
|
||||
Log.Error("Script " + m_td.FullName + " uses the attribute [Client] on the method " + md.Name + " but is not a NetworkBehaviour.");
|
||||
Weaver.fail = true;
|
||||
}
|
||||
else if (attrName == "Mirror.ClientCallbackAttribute")
|
||||
{
|
||||
Log.Error("Script " + m_td.FullName + " uses the attribute [ClientCallback] on the method " + md.Name + " but is not a NetworkBehaviour.");
|
||||
Weaver.fail = true;
|
||||
case "Mirror.ServerAttribute":
|
||||
Log.Error("Script " + m_td.FullName + " uses the attribute [Server] on the method " + md.Name + " but is not a NetworkBehaviour.");
|
||||
Weaver.fail = true;
|
||||
break;
|
||||
case "Mirror.ServerCallbackAttribute":
|
||||
Log.Error("Script " + m_td.FullName + " uses the attribute [ServerCallback] on the method " + md.Name + " but is not a NetworkBehaviour.");
|
||||
Weaver.fail = true;
|
||||
break;
|
||||
case "Mirror.ClientAttribute":
|
||||
Log.Error("Script " + m_td.FullName + " uses the attribute [Client] on the method " + md.Name + " but is not a NetworkBehaviour.");
|
||||
Weaver.fail = true;
|
||||
break;
|
||||
case "Mirror.ClientCallbackAttribute":
|
||||
Log.Error("Script " + m_td.FullName + " uses the attribute [ClientCallback] on the method " + md.Name + " but is not a NetworkBehaviour.");
|
||||
Weaver.fail = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user