Content pipeline is process to convert any native content format like .png
and .obj
to general content format .bin
, or steadfastly use native content format. Content building should be carried out when development phase. So loading and reading content get best performance on runtime.
Usually, project file name is YourProjectName.Content.xml
in under YourProjectName
folder.
<?xml version="1.0" encoding="utf-8"?>
<ContentProject>
<Name>YourProjectName.Content</Name>
<InputDirectory>YourProjectName.Content</InputDirectory>
<OutputDirectory>bin</OutputDirectory>
<ContentRootDirectory></ContentRootDirectory>
<Configuration>Release</Configuration>
<TargetPlatform>Windows</TargetPlatform>
<References>
</References>
<Items>
</Items>
</ContentProject>
All content like meshes, images, audio, font, and effects is done on Items
markup.
<Item Include="\Textures\Impression.png">
<Name>Impression</Name>
<BuildAction>Compile</BuildAction>
<Importer Name="TextureImporter">
</Importer>
<Processor Name="TextureProcessor">
</Processor>
</Item>
Include path is relative by content project folder and detail of Importer and Processor see next section. We recommend naming convention of filename
on Include
and Name
is equal. BuildAction
can be None
, Compile
, or Copy
.
Compile
, content will be compiled as .bin
and copy it to OutputDirectory
Copy
, content will not be compiled as .bin
, but steadfastly use native content format. Actually only copy the content to OutputDirectory
None
, content will not be Compiled
or Copy
Add your library .dll
path to References
markup. See code below.
....
<References>
<Reference>{path-to}\LevelImporter.dll</Reference>
</References>
....
Reference path must be absolute.