xLua icon indicating copy to clipboard operation
xLua copied to clipboard

恢复简化版的 LuaAsset

Open buger404 opened this issue 9 months ago • 1 comments

恢复了被移除的 LuaAsset,但版本进行了简化(#876)

  • 修改了图标加载方式,改为使用资产 GUID 替代路径来加载 LuaAsset 图标
  • 保留了使 Unity Editor 可识别 .lua 文件的功能,同时保留了 text 属性,兼容原有 TextAsset 的写法

几年前有人提出了类似的方案,但最终未提交 PR,于是决定补上这个 PR(#910)

原本的 LuaAsset 因复杂性被移除( d7150f3995851c2b5148747b96f6186a03b707ce ),这版则是仅让 Unity 可以使用 .lua 文件。

虽然功能不大,但我个人认为在需要依赖于 Unity 的资产系统的情境下会更友好(例如先前在 #876 提到的 “以便 lua 脚本被包含在 AssetBundle 构建中,无需添加 .txt 后缀”)。

buger404 avatar Feb 08 '25 14:02 buger404

CLA assistant check
All committers have signed the CLA.

tencent-adm avatar Feb 08 '25 14:02 tencent-adm