|
2 | 2 |
|
3 | 3 | This is a packaging utility for class libraries targeting .NET Framework 4.8 for deployment in the Unity environment |
4 | 4 |
|
| 5 | +- This is a tool meant to run after `assets.project.json` is generated |
| 6 | +- On first build/restore, it will update the `*.csproj` file and changes may not take effect until the second build |
| 7 | + |
| 8 | +> [!TIP] |
| 9 | +> It is recomended to add the following to your `*.csproj`, be sure to include the `InitialTargets="GenerateNewTargets"` |
| 10 | +> https://github.com/TGO-Inc/UnityModPackager/blob/86d9c63810226d24030f39427d446dd9cc1f2656/example.targets#L1-L16 |
| 11 | +
|
| 12 | + |
| 13 | +A reference or example of `main.targets`: |
| 14 | +https://github.com/TGO-Inc/UnityModPackager/blob/86d9c63810226d24030f39427d446dd9cc1f2656/example.main.targets#L1-L16 |
| 15 | + |
| 16 | +> [!IMPORTANT] |
| 17 | +> Make sure that UnityModPackager can be accessed at `$USER_HOME$/.dotnet/tools/` |
| 18 | +> https://github.com/TGO-Inc/UnityModPackager/blob/86d9c63810226d24030f39427d446dd9cc1f2656/UnityModPackager.csproj#L42-L44 |
| 19 | +> Here a symbolic link is created on build |
| 20 | +
|
| 21 | +Once all of the above is complete, you are ready to start modding! |
| 22 | + |
| 23 | +If you want, you can take a peak at the [Workflow](README.md#workflow) below to see how this tool works |
| 24 | + |
5 | 25 | # Workflow |
6 | 26 |
|
7 | 27 | ### Working in `*.csproj` |
@@ -60,8 +80,8 @@ https://github.com/TGO-Inc/UnityModPackager/blob/0ab66d5d05b0649d517ccd8b163110f |
60 | 80 | - Write file to `obj/GeneratedResources.targets` |
61 | 81 |
|
62 | 82 | > [!NOTE] |
63 | | -> This tool only generates the workflow for automatically embeddeding assemblies into your project |
| 83 | +> This tool only generates the workflow for automatically embedding assemblies into your project |
64 | 84 | > |
65 | | -> [Repo.Shared](https://github.com/TGO-Inc/REPO.Shared) Includes the nesseary components for automatically loading, decompressing, and resolving these internal assemblies |
| 85 | +> [Repo.Shared](https://github.com/TGO-Inc/REPO.Shared) Includes the necessary components for automatically loading, decompressing, and resolving these internal assemblies |
66 | 86 | > |
67 | 87 | > Check out [REPO.Shared.AssemblyResolver.cs](https://github.com/TGO-Inc/REPO.Shared/blob/6817cb6d2d214869e8d970d99a46c84601130347/Internal/AssemblyResolver.cs#L143-L183) to see how the library metadata is used |
0 commit comments