Page 1 of 2

Daggerfall Unity API Documentation

Posted: Mon Dec 02, 2019 2:16 pm
by TheLacus
As the community of Daggerfall Unity grows, there are more people that wish to start making mods. I noticed that even with my efforts at maintaining a documentation on workshop website, there is some confusion on where to find informations beside the basic tutorials. Something that I think is being overlooked is that, in addition to website and forums, we also have a code documentation, composed of all xml summaries; so I decided to try and give it proper spotlight by making actual API docs out of it using Docfx. Many open source projects show it on the web pages offered by github.

Anyway, this is how it looks.
EDIT. new links in second post

Re: Daggerfall Unity API Documentation

Posted: Tue Dec 03, 2019 9:35 pm
by TheLacus
I went ahead and uploaded it on github. This is the repository and this is Pages. Interkarma, what do you think about this?

Re: Daggerfall Unity API Documentation

Posted: Tue Dec 03, 2019 10:27 pm
by Interkarma
This is excellent work! To start with, I'll add a link to your docs from the links sidebar on dfworkshop.net. :)

Re: Daggerfall Unity API Documentation

Posted: Wed Dec 04, 2019 9:47 am
by Hazelnut
Nice. Wonder if there's a way to get the side nav panel to be wider... it's truncating most of the packages and theres loads of space on most peoples' screens just unused.

Re: Daggerfall Unity API Documentation

Posted: Wed Dec 04, 2019 7:43 pm
by TheLacus
Interkarma wrote: Tue Dec 03, 2019 10:27 pm This is excellent work! To start with, I'll add a link to your docs from the links sidebar on dfworkshop.net. :)
Thanks, that's awesome!
Hazelnut wrote: Wed Dec 04, 2019 9:47 am Nice. Wonder if there's a way to get the side nav panel to be wider... it's truncating most of the packages and theres loads of space on most peoples' screens just unused.
I was using a template with static toc which is suitable for local preview, but it seems not to be updated. I switched back to default theme with better handling of long namespaces, and this also reduced repository size. The toc being inserted in html files was increasing it much more than i expected
Anyway, lines now breaks at dots inside long names so the full text is visible:

du_docs.png
du_docs.png (121.65 KiB) Viewed 6215 times

Re: Daggerfall Unity API Documentation

Posted: Sun Dec 08, 2019 8:10 pm
by Rand
That's more readable, but I'm still annoyed that (like most things online, including DFworkshop) it still only uses the middle 60% of my screen.

Re: Daggerfall Unity API Documentation

Posted: Sun Dec 08, 2019 8:28 pm
by BadLuckBurt
Rand wrote: Sun Dec 08, 2019 8:10 pm That's more readable, but I'm still annoyed that (like most things online, including DFworkshop) it still only uses the middle 60% of my screen.
It doesn't help much but Ctrl + Scrollwheel to zoom in the page will make it use more than 60%. Alternatively, the stylesheet needs to be adjusted to make it stretch more to a full window width. I'll have a look later this week.

Re: Daggerfall Unity API Documentation

Posted: Sun Dec 08, 2019 9:59 pm
by TheLacus
I've added support for external links to Unity API. It was already working for C# namespaces, now is also working for UnityEngine (and all namespaces with the same first dotted name). This means that if you click on Int32 you are redirected to .NET docs, if you click on Matrix4x4 you go on Unity website and so on.

xrefmap_screen.png
xrefmap_screen.png (24.27 KiB) Viewed 6109 times
If someome is interested, this is how i exported type data from unity assemblies. Unity docs follows a peculiar pattern where the url is based on the fullname without the first part. This means that UnityEngine.Matrix4x4 is found at ScriptReference/Matrix4x4.html but also that UnityEngine.ParticleSystem.CollisionModule is at ScriptReference/ParticleSystem.CollisionModule.html and of course UnityEditor.AI.NavMeshEditorHelpers is also at ScriptReference/AI.NavMeshEditorHelpers.html. Hopefully this is always consistent and there are no broken links. Something that bothers me is that i couldn't associate UnityEngine.Object. I wanted to edit it manually to include namespace and not confuse it with System.Object, but it just doesn't work at all.

Re: Daggerfall Unity API Documentation

Posted: Sun Dec 08, 2019 10:02 pm
by TheLacus
Rand wrote: Sun Dec 08, 2019 8:10 pm That's more readable, but I'm still annoyed that (like most things online, including DFworkshop) it still only uses the middle 60% of my screen.
I think the main column looks fine but the index on the left should be wider. Like .NET docs for example.

Re: Daggerfall Unity API Documentation

Posted: Sun May 10, 2020 7:40 pm
by TheLacus
As is do after every new build, i just updated API documentation. I also upgraded Docfx version so this comes with an improved theme :)

df-unity-docs.png
df-unity-docs.png (92.83 KiB) Viewed 5837 times
df-unity-docs-0.png
df-unity-docs-0.png (100.43 KiB) Viewed 5832 times