Referencing assembly does not seem to work
Hi everyone,
I am unsure if the following is a bug or if I misunderstood something, since I only recently started to learn how to use assembly definitions in Unity.
I have a Unity 6.3 project with two subfolders in my Scripts folder, each of which has its own assembly definition.
I installed the Unity OSC package: https://github.com/Unity-Technologies/UnityOSCProtocolSupport
Now when I edit some of my code and enter something like protected OscSender sender;, Rider correctly suggests to reference the assembly (although it weirdly shows version 0.0.0.0) and import the type OscSender. This seems to work, until I activate the Unity window and hence trigger a recompile, at which point Unity notices that it does not indeed know the Unity.Media.Osc namespace.
I solve this by manually adding a reference to the assembly to my own assembly definition. So I guess Rider does not recognize my assembly definition and therefore does not edit it. I just wonder what Rider actually does the moment I click the “reference assembly” suggestion?
If this sounds like a bug, I can open a ticket and supply the usual logs there.

Please sign in to leave a comment.
Hello, the “Reference assembly” action is for general C# projects, and not supported for Unity registry package yet. This feature is tracked under RIDER-94834 "Reference project and import" for registry package fails. Currently, there is no immediate plan to implement it. You can upvote and subscribe to receive updates. Please let me know if any further clarification is needed.