summaryrefslogtreecommitdiff
path: root/Plugins/MonoGame.Extended/source/MonoGame.Extended.Content.Pipeline/TextureAtlases/TexturePackerProcessor.cs
blob: 1f14ee7736e7ed585602bd8510fe3b6b272c0d61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;
using Microsoft.Xna.Framework.Content.Pipeline;
using MonoGame.Extended.TextureAtlases;

namespace MonoGame.Extended.Content.Pipeline.TextureAtlases
{
    [ContentProcessor(DisplayName = "TexturePacker Processor - MonoGame.Extended")]
    public class TexturePackerProcessor : ContentProcessor<TexturePackerFile, TexturePackerProcessorResult>
    {
        public override TexturePackerProcessorResult Process(TexturePackerFile input, ContentProcessorContext context)
        {
            try
            {
                var output = new TexturePackerProcessorResult {Data = input};
                return output;
            }
            catch (Exception ex)
            {
                context.Logger.LogMessage("Error {0}", ex);
                throw;
            }
        }
    }
}