Unity3D - Resolving Plugin Namespace Collisions

Completed

I'm using PlayerIO for multiplayer. Their Unity plugin performs shenanigans with GameObjects including calling DontDestroyOnLoad, which throws InvalidOperationException when running from an Editor script (need this to write an editor extension to move data from ScriptableObjects into their DB). They also have a plain C# SDK, which seems shenanigan-free.

Unfortunately both plugins use the same namespace and classes, confusing Rider significantly. Unity, however, is happy to compile as long as the plugins are marked to exclude the irrelevant platform. Otherwise, Unity complains that it can't resolve references to classes in that namespace.

Rider does seem to understand what's going on, as you can see in the following screenshot. But executing the highlighted action results in no change. What is it supposed to do and how can I get Rider to play nice?

Platform-specific plugins aren't unknown in Unity - that's why the exclusion feature exists. I won't be the only one to run into this limitation.

1 comment
Comment actions Permalink

Would you be able to provide some more details, please? How are the two different assemblies referenced, and how are the appropriate references excluded? Do you have a sample repro that demonstrates the issue and how it should work? And does it work with other IDEs, such as MonoDevelop, or Visual Studio?

0

Please sign in to leave a comment.