mirror of
https://github.com/Ellpeck/Contentless.git
synced 2024-11-26 00:48:34 +01:00
updated readme
This commit is contained in:
parent
99b746fc42
commit
ff4b7d6f01
1 changed files with 7 additions and 5 deletions
10
README.md
10
README.md
|
@ -1,16 +1,18 @@
|
||||||
![The Contentless logo](https://raw.githubusercontent.com/Ellpeck/Contentless/main/Logo.png)
|
![The Contentless logo](https://raw.githubusercontent.com/Ellpeck/Contentless/main/Logo.png)
|
||||||
|
|
||||||
**Contentless** is tool for MonoGame that automatically handles adding assets to the Content Pipeline project so you don't have to use their interface to add every content file manually.
|
**Contentless** is tool for MonoGame that automatically handles adding assets to the Content Pipeline project, so you don't have to use their interface to add every content file manually.
|
||||||
|
|
||||||
# How to use
|
# How to use
|
||||||
To use Contentless, you first have to add it to your project, either through your NuGet package manager or by adding it to your `.csproj` file as follows. Keep in mind to update the `Version` to the most recent one. You can find the package on the [NuGet website](https://www.nuget.org/packages/Contentless/) as well.
|
To use Contentless, you first have to add it to your project, either through your NuGet package manager or by adding it to your `.csproj` file as follows. Keep in mind to update the `Version` to the most recent one. You can find the package on the [NuGet website](https://www.nuget.org/packages/Contentless/) as well.
|
||||||
```xml
|
```xml
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Contentless" Version="VERSION" />
|
<PackageReference Include="Contentless" Version="VERSION" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
```
|
```
|
||||||
Next, you need to find the reference to your `Content.mgcb` file in your `.csproj` file or create one if there isn't already one present. The reference's type should be `MonoGameContentReference` so that Contentless can identify it correctly. If you're using the [MonoGame Content Builder](https://www.nuget.org/packages/MonoGame.Content.Builder.Task) alongside Contentless, this setting should already be applied.
|
Next, you need to find the reference to your `Content.mgcb` file in your `.csproj` file or create one if there isn't already one present. The reference's type should be `MonoGameContentReference` so that Contentless can identify it correctly. If you're using the [MonoGame Content Builder](https://www.nuget.org/packages/MonoGame.Content.Builder.Task) alongside Contentless, this setting should already be applied.
|
||||||
```xml
|
```xml
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<MonoGameContentReference Include="Content\Content.mgcb" />
|
<MonoGameContentReference Include="Content\Content.mgcb" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -19,7 +21,7 @@ Next, you need to find the reference to your `Content.mgcb` file in your `.cspro
|
||||||
Contentless will now automatically add any content files from your `Content` directory and subdirectories to your `Content.mgcb` file if they haven't already been added either manually or by Contentless. No existing items' configurations will be overridden, so you can still use the Content Pipeline tool to modify any settings as well.
|
Contentless will now automatically add any content files from your `Content` directory and subdirectories to your `Content.mgcb` file if they haven't already been added either manually or by Contentless. No existing items' configurations will be overridden, so you can still use the Content Pipeline tool to modify any settings as well.
|
||||||
|
|
||||||
# Configuring
|
# Configuring
|
||||||
To add a configuration file to Contentless, simply create a file named `Contentless.json` in the same directory as your `Content.mgcb` file. You can use the config to change several options:
|
If you want to change the way Contentless works, you can use a configuration file. To do so, simply create a file named `Contentless.json` in the same directory as your `Content.mgcb` file. You can use the config to change several options:
|
||||||
```json5
|
```json5
|
||||||
{
|
{
|
||||||
// The list of files that should be excluded. Can use regex.
|
// The list of files that should be excluded. Can use regex.
|
||||||
|
@ -63,8 +65,8 @@ To add a configuration file to Contentless, simply create a file named `Contentl
|
||||||
For an example of a config in use, see the [test config](https://github.com/Ellpeck/Contentless/blob/main/Test/Content/Contentless.json).
|
For an example of a config in use, see the [test config](https://github.com/Ellpeck/Contentless/blob/main/Test/Content/Contentless.json).
|
||||||
|
|
||||||
# What it does
|
# What it does
|
||||||
When running Contentless and supplying the location of a MonoGame Content Pipeline project (`Content.mgcb`), it scans all of the files in the project's directory as well as its subdirectories. For each file, it checks if the `Content.mgcb` file already contains any references to that file. If no references are found, then a new reference to the file is added.
|
When running Contentless and supplying the location of a MonoGame Content Pipeline project (`Content.mgcb`), it scans all the files in the project's directory as well as its subdirectories. For each file, it checks if the `Content.mgcb` file already contains any references to that file. If no references are found, then a new reference to the file is added.
|
||||||
|
|
||||||
Contentless figures out which importer and processor to register for any given file by generating a list of all of the importers and processors that are available, both inside of MonoGame, and inside of References added to the `Content.mgcb` file. This process is similar to what occurs when adding an existing file through MonoGame's Content Pipeline tool. If Contentless sets the wrong importer or processor for any file, the user can simply open `Content.mgcb` in MonoGame's Content Pipeline tool and edit it manually.
|
Contentless figures out which importer and processor to register for any given file by generating a list of all the importers and processors that are available, both inside of MonoGame, and inside of References added to the `Content.mgcb` file. This process is similar to what occurs when adding an existing file through MonoGame's Content Pipeline tool. If Contentless sets the wrong importer or processor for any file, the user can simply open `Content.mgcb` in MonoGame's Content Pipeline tool and edit it manually.
|
||||||
|
|
||||||
As Contentless never changes any existing content of a `Content.mgcb` file, all changes that are made to it by hand or using the Content Pipeline tool will not be overridden.
|
As Contentless never changes any existing content of a `Content.mgcb` file, all changes that are made to it by hand or using the Content Pipeline tool will not be overridden.
|
Loading…
Reference in a new issue