I am having a strange issue with a custom content processor for processing map levels.
I have the following code which imports a PNG image. When I use the serialized data in the spriteBatch.Draw(..) call, the renderer does not see magenta as transparent and the magenta color is left on the screen:
var extRef = new ExternalReference<Texture2DContent>(path); var texture = context.BuildAsset<Texture2DContent, Texture2DContent>(extRef, null, data, null, asset);
If I modify the code to use a TextureContent type along with the required importer and processor types, along with some casting on the game-code-side the transparency is fine and there is no magenta shown:
var extRef = new ExternalReference<TextureContent>(path); var texture = context.BuildAsset<TextureContent, TextureContent>(extRef, "TextureProcessor", data, "TextureImporter", asset);
Could someone please shed some light on what is going on here?