From acea7b2e728787a0d83bbf83c8c1f042d2c32e7e Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Mon, 3 Jun 2024 10:15:45 +0800 Subject: + plugins project --- .../Json/JsonContentImporter.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Plugins/MonoGame.Extended/source/MonoGame.Extended.Content.Pipeline/Json/JsonContentImporter.cs (limited to 'Plugins/MonoGame.Extended/source/MonoGame.Extended.Content.Pipeline/Json/JsonContentImporter.cs') diff --git a/Plugins/MonoGame.Extended/source/MonoGame.Extended.Content.Pipeline/Json/JsonContentImporter.cs b/Plugins/MonoGame.Extended/source/MonoGame.Extended.Content.Pipeline/Json/JsonContentImporter.cs new file mode 100644 index 0000000..437d7eb --- /dev/null +++ b/Plugins/MonoGame.Extended/source/MonoGame.Extended.Content.Pipeline/Json/JsonContentImporter.cs @@ -0,0 +1,15 @@ +using System.IO; +using Microsoft.Xna.Framework.Content.Pipeline; + +namespace MonoGame.Extended.Content.Pipeline.Json +{ + [ContentImporter(".json", DefaultProcessor = nameof(JsonContentProcessor), DisplayName = "JSON Importer - MonoGame.Extended")] + public class JsonContentImporter : ContentImporter> + { + public override ContentImporterResult Import(string filename, ContentImporterContext context) + { + var json = File.ReadAllText(filename); + return new ContentImporterResult(filename, json); + } + } +} -- cgit v1.1-26-g67d0