New answers tagged xna-content-pipeline
nailed it, for those having the same trouble, you should add two lines in the processor: EffectContent effectSource = new EffectContent(); effectSource.EffectCode = input.SourceCode; //Add these two lines: effectSource.Identity = new ContentIdentity(); effectSource.Identity.SourceFilename = input.name; //End of correction EffectProcessor processor = new ...
Set Game.Content.RootDirectory to the path you want and then just specify the file name portion. But keep in mind that you still have to include them in the Content project. If you don't want to/can't do that, then forgo the ContentPipeline altogether.
Dynamically importing and processing content at runtime is explained in the sample WinForms Series 2: Content Loading. This is the preferred method. You can also build an XNA Content Project file using MSBuild. this blog post explains how. You can create a temporary project file, so you don't need to modify or rebuild files in your Solution. Additional ...
In Visual Studio... Right mouse click on the Content Project Select 'Add' then 'Existing Item...' Navigate to the folder containing your content, change the filetype from the drop down box if needed, select your content file, then click on 'Add'. Use your content.
Top 50 recent answers are included