Skip to content

Commit e28b3b6

Browse files
committed
Update documents.
1 parent 222cbd4 commit e28b3b6

File tree

7 files changed

+60
-1
lines changed

7 files changed

+60
-1
lines changed

CITest/Assets/Tests/CITest.cs

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
using Cysharp.Text;
99

10-
1110
namespace kumaS.NuGetImporter.CI.Tests
1211
{
1312
public class CITest

NuGetImporterForUnity/Packages/NuGet Importer/Documentation~/README.md

+15
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ This package also fully supports native plugins.
1919
- Powerful dependency solving
2020
- Full support for native plugins
2121
- Support for Roslyn Analyzer
22+
- Support for CI/CD
2223
- Useful UI
2324
- UPM and unitypackage support
2425
- Compatible with [GlitchEnzo/NuGetForUnity](https://github.com/GlitchEnzo/NuGetForUnity)
@@ -79,6 +80,20 @@ You may want to keep installed packages out of git's tracking. In that case, you
7980
!/[Pp]ackages/your embedded package to share with git/
8081
```
8182

83+
If you set these packages out of git's tracking, you will get a compile error when you run CI/CD.
84+
Therefore, if you want to use CI/CD with the packages out of git's tracking, you should take one of the following three ways.
85+
86+
1. Add `-ignoreCompilerErrors` command line options when launching Unity with batch mode.
87+
1. Add `NUGET_PACKAGE_READY` to `Define Constraints` in .asmdef that depends on the installed package.
88+
1. Enclose your code that depends on the imported packages in the preprocessor directives below.
89+
```csharp
90+
#if NUGET_PACKAGE_READY
91+
92+
// your code
93+
94+
#endif
95+
```
96+
8297
## Note
8398

8499
NuGet-importer-for-Unity install files not required at runtime (e.g., rulesets, documentation, etc.) are installed to `(your project)/NuGet`. If you want to reference them, add them reference manually.

NuGetImporterForUnity/Packages/NuGet Importer/Documentation~/README_jp.md

+15
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- 強力な依存関係解決
1919
- ネイティブプラグインに対する完全な対応
2020
- Roslyn Analyzer も対応
21+
- CI/CD に対応
2122
- わかりやすいUI
2223
- UPM対応・unitypackageあり
2324
- [GlitchEnzo/NuGetForUnity](https://github.com/GlitchEnzo/NuGetForUnity)との互換性あり
@@ -75,6 +76,20 @@
7576
!/[Pp]ackages/your embedded package to share with git/
7677
```
7778

79+
ただし、パッケージを Git の監理外にするとそのままではコンパイルエラーが発生し CI/CD に使用できません。
80+
そのため、パッケージを Git の監理外にし CI/CD をする際は以下の3つの対応策のうちどれかを行ってください。
81+
82+
1. バッチモードの起動オプションに `-ignoreCompilerErrors` を追加。
83+
1. 導入したパッケージに依存する .asmdef の `Define Constraints``NUGET_PACKAGE_READY` を追加。
84+
1. 導入したパッケージに依存するコードを以下のようにプリプロセッサディレクディブで囲う。
85+
```csharp
86+
#if NUGET_PACKAGE_READY
87+
88+
// your code
89+
90+
#endif
91+
```
92+
7893
## 注意点
7994

8095
実行時に必要なファイル以外(例:アナライザーやドキュメントなど)は `(your project)/NuGet` 以下に配置されます。参照する際は手動で追加してください。

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ This package also fully supports native plugins.
1919
- Powerful dependency solving
2020
- Full support for native plugins
2121
- Support for Roslyn Analyzer
22+
- Support for CI/CD
2223
- Useful UI
2324
- UPM and unitypackage support
2425
- Compatible with [GlitchEnzo/NuGetForUnity](https://github.com/GlitchEnzo/NuGetForUnity)

README_jp.md

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- 強力な依存関係解決
1919
- ネイティブプラグインに対する完全な対応
2020
- Roslyn Analyzer も対応
21+
- CI/CD に対応
2122
- わかりやすいUI
2223
- UPM対応・unitypackageあり
2324
- [GlitchEnzo/NuGetForUnity](https://github.com/GlitchEnzo/NuGetForUnity)との互換性あり

docFX/documentation/usage.md

+14
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,20 @@ You may want to keep installed packages out of git's tracking. In that case, you
5151
!/[Pp]ackages/your embedded package to share with git/
5252
```
5353
54+
If you set these packages out of git's tracking, you will get a compile error when you run CI/CD.
55+
Therefore, if you want to use CI/CD with the packages out of git's tracking, you should take one of the following three ways.
56+
57+
1. Add `-ignoreCompilerErrors` command line options when launching Unity with batch mode.
58+
1. Add `NUGET_PACKAGE_READY` to `Define Constraints` in .asmdef that depends on the installed package.
59+
1. Enclose your code that depends on the imported packages in the preprocessor directives below.
60+
```csharp
61+
#if NUGET_PACKAGE_READY
62+
63+
// your code
64+
65+
#endif
66+
```
67+
5468
## Usage in Unity
5569
5670
### Menu item

docFX/documentation_jp/usage.md

+14
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,20 @@
5151
!/[Pp]ackages/your embedded package to share with git/
5252
```
5353

54+
ただし、パッケージを Git の監理外にするとそのままではコンパイルエラーが発生し CI/CD に使用できません。
55+
そのため、パッケージを Git の監理外にし CI/CD をする際は以下の3つの対応策のうちどれかを行ってください。
56+
57+
1. バッチモードの起動オプションに `-ignoreCompilerErrors` を追加。
58+
1. 導入したパッケージに依存する .asmdef の `Define Constraints``NUGET_PACKAGE_READY` を追加。
59+
1. 導入したパッケージに依存するコードを以下のようにプリプロセッサディレクディブで囲う。
60+
```csharp
61+
#if NUGET_PACKAGE_READY
62+
63+
// your code
64+
65+
#endif
66+
```
67+
5468
## Unityでの使い方
5569

5670
### メニューアイテム

0 commit comments

Comments
 (0)