Daggerfall Unity API Documentation

Discuss coding questions, pull requests, and implementation details.
User avatar
TheLacus
Posts: 1305
Joined: Wed Sep 14, 2016 6:22 pm

Daggerfall Unity API Documentation

Post 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

User avatar
TheLacus
Posts: 1305
Joined: Wed Sep 14, 2016 6:22 pm

Re: Daggerfall Unity API Documentation

Post 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?

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Daggerfall Unity API Documentation

Post by Interkarma »

This is excellent work! To start with, I'll add a link to your docs from the links sidebar on dfworkshop.net. :)

User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Daggerfall Unity API Documentation

Post 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.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
TheLacus
Posts: 1305
Joined: Wed Sep 14, 2016 6:22 pm

Re: Daggerfall Unity API Documentation

Post 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 6207 times

User avatar
Rand
Posts: 72
Joined: Sat Nov 23, 2019 5:10 am
Location: Canada

Re: Daggerfall Unity API Documentation

Post 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.

User avatar
BadLuckBurt
Posts: 948
Joined: Sun Nov 05, 2017 8:30 pm

Re: Daggerfall Unity API Documentation

Post 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.
DFU on UESP: https://en.uesp.net/w/index.php?title=T ... fall_Unity
DFU Nexus Mods: https://www.nexusmods.com/daggerfallunity
My github repositories with mostly DFU related stuff: https://github.com/BadLuckBurt

.

User avatar
TheLacus
Posts: 1305
Joined: Wed Sep 14, 2016 6:22 pm

Re: Daggerfall Unity API Documentation

Post 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 6101 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.

User avatar
TheLacus
Posts: 1305
Joined: Wed Sep 14, 2016 6:22 pm

Re: Daggerfall Unity API Documentation

Post 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.

User avatar
TheLacus
Posts: 1305
Joined: Wed Sep 14, 2016 6:22 pm

Re: Daggerfall Unity API Documentation

Post 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 5829 times
df-unity-docs-0.png
df-unity-docs-0.png (100.43 KiB) Viewed 5824 times

Post Reply