Added setup system. Changed reader and writer for texture atlas and nine patch to have image and serialized data be in same file. Some refactors occurred as well.
This commit is contained in:
@@ -6,16 +6,19 @@ using RecrownedAthenaeum.Data;
|
||||
namespace RecrownedAthenaeum.Pipeline.NinePatch
|
||||
{
|
||||
[ContentTypeWriter]
|
||||
class NinePatchWriter : ContentTypeWriter<NinePatchData>
|
||||
class NinePatchWriter : ContentTypeWriter<NinePatchProcessor.Package>
|
||||
{
|
||||
public override string GetRuntimeReader(TargetPlatform targetPlatform)
|
||||
{
|
||||
return "RecrownedAthenaeum.ContentReaders.NinePatchDataReader, RecrownedAthenaeum";
|
||||
}
|
||||
|
||||
protected override void Write(ContentWriter output, NinePatchData value)
|
||||
protected override void Write(ContentWriter output, NinePatchProcessor.Package value)
|
||||
{
|
||||
output.Write(JsonConvert.SerializeObject(value));
|
||||
output.Write(value.textureBytes.Length);
|
||||
output.Write(value.textureBytes);
|
||||
output.Write(value.ninePatchDataBytes.Length);
|
||||
output.Write(value.ninePatchDataBytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user