From e909d12fa3f8751cc95eb4eba1d28ef7c5cffecd Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 3 May 2026 19:19:33 +0000 Subject: [PATCH] refactor: move DocFxForUnity.csproj into Documentation/ Simplifies setup: users only need to copy one folder (Documentation/) instead of a folder plus a separate file at the project root. - Add explicit Compile glob (../Assets/**/*.cs) since the SDK default no longer covers Assets/ from the new location - Fix lib/UnityEngine fallback path to ../lib/UnityEngine - Update docfx.json metadata src from ".." to "." - Update README accordingly https://claude.ai/code/session_017hjwp9DHW2Sh6ZNhMF2Lbs --- .../DocFxForUnity.csproj | 7 ++++++- Documentation/docfx.json | 2 +- README.md | 9 ++++----- 3 files changed, 11 insertions(+), 7 deletions(-) rename DocFxForUnity.csproj => Documentation/DocFxForUnity.csproj (90%) diff --git a/DocFxForUnity.csproj b/Documentation/DocFxForUnity.csproj similarity index 90% rename from DocFxForUnity.csproj rename to Documentation/DocFxForUnity.csproj index 85ccd49..64c367b 100644 --- a/DocFxForUnity.csproj +++ b/Documentation/DocFxForUnity.csproj @@ -1,8 +1,13 @@ netstandard2.1 + false + + + + $(UNITY_MANAGED_PATH) - $(MSBuildProjectDirectory)/lib/UnityEngine + $(MSBuildProjectDirectory)/../lib/UnityEngine diff --git a/Documentation/docfx.json b/Documentation/docfx.json index fe3198b..d557030 100644 --- a/Documentation/docfx.json +++ b/Documentation/docfx.json @@ -3,7 +3,7 @@ { "src": [ { - "src": "..", + "src": ".", "files": [ "DocFxForUnity.csproj" ] diff --git a/README.md b/README.md index df89854..2bf28ec 100644 --- a/README.md +++ b/README.md @@ -20,19 +20,18 @@ online: . It references both C# A ## Setup your documentation 1. [Install DocFX](https://dotnet.github.io/docfx/tutorial/docfx_getting_started.html#2-use-docfx-as-a-command-line-tool). -2. Copy the `Documentation/` folder and `DocFxForUnity.csproj` to your Unity project: +2. Copy the `Documentation/` folder to your Unity project: ```diff . ├── Assets - + ├── DocFxForUnity.csproj + ├── Documentation ├── Package ├── ProjectSettings └── README.md ``` - You can rename `DocFxForUnity.csproj` to match your project — just update the filename in `Documentation/docfx.json` under `metadata[0].src[0].files` accordingly. + You can rename `Documentation/DocFxForUnity.csproj` to match your project — just update the filename in `Documentation/docfx.json` under `metadata[0].src[0].files` accordingly. 3. Edit the following properties in `Documentation/docfx.json`, keep the others as it is: @@ -139,7 +138,7 @@ details. - DocFX outputs: `Warning:[ExtractMetadata]No project detected for extracting metadata.` - Solution: Make sure you copied `DocFxForUnity.csproj` (or your renamed version) to the root of your Unity project, and that the filename matches the entry in `Documentation/docfx.json` under `metadata[0].src[0].files`. + Solution: Make sure `DocFxForUnity.csproj` (or your renamed version) is inside the `Documentation/` folder, and that the filename matches the entry in `Documentation/docfx.json` under `metadata[0].src[0].files`. - DocFX outputs: `Warning:[ExtractMetadata]No metadata is generated for Assembly-CSharp,Assembly-CSharp-Editor.` @@ -170,7 +169,7 @@ details. ## Advanced: `UNITY_MANAGED_PATH` -By default, `DocFxForUnity.csproj` auto-detects the Unity managed DLLs from the standard Unity Hub installation directory. Set `UNITY_MANAGED_PATH` when you need to: +By default, `Documentation/DocFxForUnity.csproj` auto-detects the Unity managed DLLs from the standard Unity Hub installation directory. Set `UNITY_MANAGED_PATH` when you need to: - Use a Unity version installed at a non-default location. - Pin to a specific version when multiple Unity versions are installed.