recrownedgtk/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasProcessor.cs

18 lines
635 B
C#
Raw Normal View History

using Microsoft.Xna.Framework.Content.Pipeline;
using Newtonsoft.Json;
using System.Text;
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
{
[ContentProcessor(DisplayName = "Texture Atlas - RecrownedAthenaeum")]
class TextureAtlasProcessor : ContentProcessor<string, TextureAtlasData>
{
public override TextureAtlasData Process(string input, ContentProcessorContext context)
{
TextureAtlasData textureAtlasData = JsonConvert.DeserializeObject<TextureAtlasData>(input);
context.AddDependency(textureAtlasData.textureName);
return textureAtlasData;
}
}
}