Currently we have 2 steps that happen when dragging in content:
- File is dropped into the editor, some preliminary checking happens, some meta data is extracted, etc. then the file is send to the content service
- Content Service runs through the Content Importer plugins to bring the file into a compatible format, then it is stored into the user project database
Then using the content (in editor or game, on windows or any mobile device):
- Content Service runs through the Content Exporter plugins to provide the best file format for the platform. Is cached for all download requests and often just returns the imported file.
- Client (DeveloperOnlineContentLoader) receives the file and puts into the available resources for consumption
At any of those 4 steps code can be executed to process. We obviously work 99% of the time on the content importer and exporter plugins, but have not spend much time thinking about supporting user plugins (which is difficult because of many dependencies). In v0.9.5 user plugins were possible, but it really made things hard and every version would be incompatible anyway, so this feature is for later.
I recommend just putting your processor at the very first step, when a file is dropped into the Editor, before sending it to the content service. You could also use DiskContentLoader to test this and you would not need to be online. The file would only be processed once and on subsequent changes, but you always will have a processed fast version when consuming it (that is how all content works).
The new content system coming in v1.2 (June 2014) is a bit more flexible and much more xml driven, thus more customization is possible, but currently there is no plan on additional processors (instead of increasing it we just reduced it to the most basic 7 file formats and removed all the rest to make things simple). This is the ContentFileTypes enum for v1.2 (Data is mostly just byte data, but can be anything you like, usually 90% are images, 10% xml, sound, etc.):
Code:
public enum ContentFileType
{
Data,
Image,
Xml,
Sound,
Music,
Video,
Json
}
All other data is stored a xml, including all content templates (materials, 3D models, meshes, particle effects, etc.) and all game entities are stored as xml as well (this is completely customize-able and might make you need for scripting obsolete).