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