improve 'No writer found' error to make it more obvious why it happens and how to solve it

This commit is contained in:
vis2k 2021-08-12 00:18:55 +08:00
parent 811f1fadfc
commit 875c78c222

View File

@ -80,7 +80,7 @@ public void Write<T>(T value)
Action<NetworkWriter, T> writeDelegate = Writer<T>.write;
if (writeDelegate == null)
{
Debug.LogError($"No writer found for {typeof(T)}. Use a type supported by Mirror or define a custom writer");
Debug.LogError($"No writer found for {typeof(T)}. This happens either if you are missing a NetworkWriter extension for your custom type, or if weaving failed. Try to reimport a script to weave again.");
}
else
{