17 lines
524 B
C#
17 lines
524 B
C#
|
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);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|