To clarify, the conflict is in the IDE (Visual Studio) only, there is no actual compiler error inside the editor.
It messes up intellisense, auto completion, cleaning up unused using directives, and more. Compiling inside visual studio does not work (the compiler fails), so debugging is not possible either.
Edit: I posted this in the wrong forum, this should be in the Unity Transport forum… Sorry.
The docs mention to create a separate assembly. Is this mandatory, perhaps? I’m not sure how it solves the issue, though, since I’d like to use netcode and logging in the same assembly, but maybe I’m missing something.
I’d be interested to know why it works like this if that’s the case (curiosity!).
You also mention using Netcode. Do you mean Netcode for Entities? If so, do you get the same problem if using the NetDebug singleton? Or do you have a specific requirement to use custom loggers?
I found this issue when I tried to use dependency injection instead of using statics. I was using this to forward the logs for server builds (as in here ), because the NGO docs say [quote]
Unity’s built-in logging (Debug.Log) doesn’t work for server-hosted games because it lacks the following requirements
[/quote]
It looks like maybe it’s not strictly speaking necessary: I’ve seen some logs in the file that were logged before I even set up the custom logger, so this warrants some experimentation on my side. In any case, I’m not blocked on this.
Yeah, using the logging package is certainly not required for a server-hosted game. It provides some functionality that’s typically useful for servers (log rotation, asynchronous logging), but you’ll get basic log files with Unity’s default logger too and if that’s sufficient for your use case, I’d recommend sticking with that. I’ll reach out to the documentation team to make this clearer in the documentation.
I’ll also have a look at that issue with Visual Studio. It does look very annoying.