How can one extend a model processor inside Windows Forms. In a normal XNA game you would simply create a new class like so(I think...):
[ContentProcessor]
public class ExtendedModelProcessor : ModelProcessor
{
protected override ModelContent Process(NodeContent input,
ContentProcessorContext context)
{
ModelContent m = base.Process(input,context)
//my own code
}
}
How can I duplicate this inside Windows Forms project, I am working on a project from microsoft site, "WinFormsContentLoading sample". I tried creating a class like above, but didnt work, then I tried to change the processor on contentBuilder.Add(...,"ExtendedModelProcessor")
. And I also tried creating a new .dll ContentExtensionLibrary and then adding it inside ContentBuilder
class, under:
static string[] pipelineAssemblies =
{
"Microsoft.Xna.Framework.Content.Pipeline.FBXImporter" + xnaVersion,
"Microsoft.Xna.Framework.Content.Pipeline.XImporter" + xnaVersion,
"Microsoft.Xna.Framework.Content.Pipeline.TextureImporter" + xnaVersion,
"Microsoft.Xna.Framework.Content.Pipeline.EffectImporter" + xnaVersion,
Application.StartupPath + "\\myDll.dll"
};
And adding the .dll to the same folder as the program. But nothing worked. How can I create an extension for ModelProcessor inside Windows Forms?
Thanks