more descriptive display name + set default processors.
This commit is contained in:
parent
9df8503f08
commit
7116eb0437
@ -4,7 +4,7 @@ using System.IO;
|
||||
|
||||
namespace RecrownedAthenaeum.Pipeline.NinePatch
|
||||
{
|
||||
[ContentImporter(".9p", DisplayName = "Nine Patch Importer")]
|
||||
[ContentImporter(".9p", DisplayName = "Nine Patch Importer", DefaultProcessor = "NinePatchProcessor")]
|
||||
internal class NinePatchImporter : ContentImporter<NinePatchData>
|
||||
{
|
||||
public override NinePatchData Import(string filename, ContentImporterContext context)
|
||||
|
@ -4,7 +4,7 @@ using System.Text;
|
||||
|
||||
namespace RecrownedAthenaeum.Pipeline.NinePatch
|
||||
{
|
||||
[ContentImporter(DisplayName = "Nine Patch Importer")]
|
||||
[ContentImporter(DisplayName = "Nine Patch Importer - RecrownedAthenaeum")]
|
||||
class NinePatchProcessor : ContentProcessor<NinePatchData, byte[]>
|
||||
{
|
||||
public override byte[] Process(NinePatchData input, ContentProcessorContext context)
|
||||
|
@ -4,16 +4,12 @@ using System.IO;
|
||||
|
||||
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
|
||||
{
|
||||
[ContentImporter(".tatlas", DisplayName = "Texture Atlas Importer")]
|
||||
[ContentImporter(".tatlas", DisplayName = "Texture Atlas Importer", DefaultProcessor = "TextureAtlasProcessor")]
|
||||
internal class TextureAtlasImporter : ContentImporter<TextureAtlasData>
|
||||
{
|
||||
public override TextureAtlasData Import(string filename, ContentImporterContext context)
|
||||
{
|
||||
TextureAtlasData atlas;
|
||||
using (StreamReader stream = new StreamReader(filename))
|
||||
{
|
||||
atlas = JsonConvert.DeserializeObject<TextureAtlasData>(stream.ReadToEnd());
|
||||
}
|
||||
TextureAtlasData atlas = JsonConvert.DeserializeObject<TextureAtlasData>(File.ReadAllText(filename));
|
||||
context.AddDependency(atlas.textureName);
|
||||
return atlas;
|
||||
}
|
||||
|
@ -4,10 +4,9 @@ using System.Text;
|
||||
|
||||
namespace RecrownedAthenaeum.Pipeline.TextureAtlas
|
||||
{
|
||||
[ContentProcessor(DisplayName = "Texture Atlas Processor")]
|
||||
[ContentProcessor(DisplayName = "Texture Atlas Processor - RecrownedAthenaeum")]
|
||||
class TextureAtlasProcessor : ContentProcessor<TextureAtlasData, byte[]>
|
||||
{
|
||||
|
||||
public override byte[] Process(TextureAtlasData input, ContentProcessorContext context)
|
||||
{
|
||||
string serialized = JsonConvert.SerializeObject(input);
|
||||
|
Loading…
Reference in New Issue
Block a user