recrownedathenaeum/RecrownedAthenaeum.Pipeline/NinePatch/NinePatchProcessor.cs

23 lines
667 B
C#

using Microsoft.Xna.Framework.Content.Pipeline;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
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);
}
}
}