This commit is contained in:
vis2k 2021-08-17 13:09:32 +08:00
parent c63152f71e
commit d0de7ed92f

View File

@ -74,15 +74,6 @@ public static void Warning(string message, MemberReference mr)
Log.Warning($"{message} (at {mr})"); Log.Warning($"{message} (at {mr})");
} }
static void CheckMonoBehaviour(TypeDefinition td)
{
if (td.IsDerivedFrom<UnityEngine.MonoBehaviour>())
{
MonoBehaviourProcessor.Process(td);
}
}
static bool WeaveNetworkBehavior(TypeDefinition td) static bool WeaveNetworkBehavior(TypeDefinition td)
{ {
if (!td.IsClass) if (!td.IsClass)
@ -90,7 +81,8 @@ static bool WeaveNetworkBehavior(TypeDefinition td)
if (!td.IsDerivedFrom<NetworkBehaviour>()) if (!td.IsDerivedFrom<NetworkBehaviour>())
{ {
CheckMonoBehaviour(td); if (td.IsDerivedFrom<UnityEngine.MonoBehaviour>())
MonoBehaviourProcessor.Process(td);
return false; return false;
} }