Open marwie opened 4 years ago
Same issue here as well. Can't refer to Unity Documentation.
DocFX requires two conditions to generate xref links:
.csproj
not from .cs
files.Therefore it requires to install and activate Unity before generating the docs to : (1) generate the .csproj
and (2) allow DocFX to generate xref links.
This is similar to #18 but here on a local machine, there on GitHub workflows.
On a local machine, you need to :
Edit your docfx.json
to generate metadata from .csproj
"metadata": [
{
"src": [
{
"src": "..",
"files": [
- "**.cs"
+ "*.csproj"
]
}
],
"globalNamespaceId": "Global",
"filter": "filterConfig.yml",
"dest": "api"
}
],
Make sure Unity has generated the .csproj
files.
Assets > Open C# Project
."C:\Program Files\Unity\Hub\Editor\<version>\Editor\Unity.exe" -batchmode -nographics -quit -executeMethod UnityEditor.SyncVS.SyncSolution
.Finally generate your docs!
I'll update the FAQ of this repo with these instructions.
Hello, thanks for the project.
Ive been trying to figure out how to get the full name of Unity type namespaces for package code. I tried running docfx but the Player class does not include Unity documentation either: the log output is as follows:
As for my own project I tried using the csproj of my package as metadata provider but I get an error in UnityEngine.Rendering.yml using "ManagedReference.html.primary.js" saying something like "error running Transform function inside template preprocessor: type if undefined". It's a 7000ish raw data json. Do you happen to have any knowledge about errors like this one and maybe a hint on how to debug? (Using the default template)