Added lua exporting

This commit is contained in:
2025-04-09 22:20:52 +02:00
parent 765575d7ae
commit b3da188438
10 changed files with 161 additions and 34 deletions

17
Editor/LuaImporter.cs Normal file
View File

@@ -0,0 +1,17 @@
using UnityEngine;
using System.IO;
using UnityEditor.AssetImporters;
namespace SplashEdit.EditorCode
{
[ScriptedImporter(1, "lua")]
class LuaImporter : ScriptedImporter
{
public override void OnImportAsset(AssetImportContext ctx)
{
var asset = new TextAsset(File.ReadAllText(ctx.assetPath));
ctx.AddObjectToAsset("Text", asset);
ctx.SetMainObject(asset);
}
}
}