fixed up pipeline extension process because monogame is weird.

This commit is contained in:
2019-01-13 22:05:34 -06:00
parent 0b812f45fe
commit 4ac011f3cf
8 changed files with 34 additions and 36 deletions

View File

@@ -1,17 +1,16 @@
using Microsoft.Xna.Framework.Content.Pipeline;
using Newtonsoft.Json;
using System.IO;
using TImport = System.String;
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
{
[ContentImporter(".tatlas", DisplayName = "Texture Atlas Importer", DefaultProcessor = "TextureAtlasProcessor")]
internal class TextureAtlasImporter : ContentImporter<TextureAtlasData>
internal class TextureAtlasImporter : ContentImporter<TImport>
{
public override TextureAtlasData Import(string filename, ContentImporterContext context)
public override TImport Import(string filename, ContentImporterContext context)
{
TextureAtlasData atlas = JsonConvert.DeserializeObject<TextureAtlasData>(File.ReadAllText(filename));
context.AddDependency(atlas.textureName);
return atlas;
return File.ReadAllText(filename);
}
}
}