resharper-unity icon indicating copy to clipboard operation
resharper-unity copied to clipboard

Use XML documentation from referenced packages

Open citizenmatt opened this issue 5 years ago • 4 comments

Packages added via Package Manager are compiled by the Unity editor and cached in Library/ScriptAssemblies, together with their .pdb file. These assemblies are referenced in the generated C# project files as binary references.

Unity does not create the .xml documentation files, so there is no Quick Doc tooltip support for types or type members defined in packages. E.g. Unity.Entities.IComponentData has a lot of XML documentation in the source, but because there is no .xml file generated, this documentation is not used.

Rider cannot get the information from the source files because it doesn't really know about the source files. We do show the in Unity Explorer, but they're not part of a project. The best we can do is navigate to the file based on .pdb information. But there is no semantic parsing and caching applied to these files.

Ideally, Unity will generate .xml files when resolving packages. In this case, Quick Doc tooltips will Just Work(tm). But this wouldn't help in earlier versions of Unity.

Can Rider get this information? Use the source information from the .pdb to locate types and members and load/cache the XML documentation from those files? Would this be too slow to do on demand - would a caching step be required? Build the .xml files from source whenever the cached .dll changes? There could be problems with inactive pre-processor branches...

citizenmatt avatar Jan 15 '20 15:01 citizenmatt

Is there any progress on this? A lot of time has passed since January 15th.

RunninglVlan avatar Oct 01 '20 13:10 RunninglVlan

Not this particular implementation. It's a large piece of work to be able to index the XML docs from non-project files, and the correct implementation is for Unity to create the XML doc files when it compiles the projects. I have spoken to Unity (just yesterday, coincidentally) and it is still on the radar, but no ETA.

citizenmatt avatar Oct 01 '20 13:10 citizenmatt

I remember in mono at least it was possible to jump to the website by clicking ctrl+` or something like that. Is there the same functionality in the rider? which could a bit overcome this problem.

nikolayinnerspace avatar Nov 04 '21 09:11 nikolayinnerspace

@nikolayinnerspace There is Ctrl+Q for QuickDoc and F1 for OnlineHelp. May depend a bit on OS and your shortcut schema.

van800 avatar Nov 04 '21 10:11 van800