psst
This commit is contained in:
@@ -2,11 +2,11 @@ using UnityEngine;
|
||||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEditor.AssetImporters;
|
||||
using Splashedit.RuntimeCode;
|
||||
using SplashEdit.RuntimeCode;
|
||||
|
||||
namespace SplashEdit.EditorCode
|
||||
{
|
||||
[ScriptedImporter(1, "lua")]
|
||||
[ScriptedImporter(2, "lua")]
|
||||
class LuaImporter : ScriptedImporter
|
||||
{
|
||||
public override void OnImportAsset(AssetImportContext ctx)
|
||||
@@ -19,7 +19,7 @@ namespace SplashEdit.EditorCode
|
||||
|
||||
ctx.AddObjectToAsset("Text", text);
|
||||
ctx.AddObjectToAsset("Script", asset);
|
||||
ctx.SetMainObject(text);
|
||||
ctx.SetMainObject(asset); // LuaFile is the main object, not TextAsset
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user