Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

恢复简化版的 LuaAsset #1184

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

恢复简化版的 LuaAsset #1184

wants to merge 3 commits into from

Conversation

buger404
Copy link

@buger404 buger404 commented Feb 8, 2025

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

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

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

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

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

@tencent-adm
Copy link
Member

tencent-adm commented Feb 8, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants