recrownedgtk/RecrownedAthenaeum.Pipeline/TextureAtlas/TextureAtlasProcessor.cs

17 lines
562 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 Processor - RecrownedAthenaeum")]
class TextureAtlasProcessor : ContentProcessor<TextureAtlasData, byte[]>
{
public override byte[] Process(TextureAtlasData input, ContentProcessorContext context)
{
string serialized = JsonConvert.SerializeObject(input);
return Encoding.UTF8.GetBytes(serialized);
}
}
}