recrownedgtk/RecrownedAthenaeum.Pipeline/NinePatch/NinePatchProcessor.cs

17 lines
524 B
C#
Raw Normal View History

using Microsoft.Xna.Framework.Content.Pipeline;
using Newtonsoft.Json;
using System.Text;
namespace RecrownedAthenaeum.Pipeline.NinePatch
{
[ContentImporter(DisplayName = "Nine Patch Importer")]
class NinePatchProcessor : ContentProcessor<NinePatchData, byte[]>
{
public override byte[] Process(NinePatchData input, ContentProcessorContext context)
{
string serialized = JsonConvert.SerializeObject(input);
return Encoding.UTF8.GetBytes(serialized);
}
}
}