more descriptive display name + set default processors.

This commit is contained in:
2019-01-13 17:09:27 -06:00
parent 9df8503f08
commit 7116eb0437
4 changed files with 5 additions and 10 deletions

View File

@@ -4,16 +4,12 @@ using System.IO;
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
{
[ContentImporter(".tatlas", DisplayName = "Texture Atlas Importer")]
[ContentImporter(".tatlas", DisplayName = "Texture Atlas Importer", DefaultProcessor = "TextureAtlasProcessor")]
internal class TextureAtlasImporter : ContentImporter<TextureAtlasData>
{
public override TextureAtlasData Import(string filename, ContentImporterContext context)
{
TextureAtlasData atlas;
using (StreamReader stream = new StreamReader(filename))
{
atlas = JsonConvert.DeserializeObject<TextureAtlasData>(stream.ReadToEnd());
}
TextureAtlasData atlas = JsonConvert.DeserializeObject<TextureAtlasData>(File.ReadAllText(filename));
context.AddDependency(atlas.textureName);
return atlas;
}