Skip to content

Conversation

@kprimo
Copy link

@kprimo kprimo commented Mar 25, 2025

功能描述

本PR增强了UnLua对GameFeature插件和普通插件的支持,使得插件中的蓝图可以更方便地绑定Lua脚本。

主要改进包括:

  1. 扩展了Lua脚本搜索路径,添加了对所有插件类型的支持
  2. 实现了插件Lua脚本的特殊查找逻辑,能够自动定位到正确的目录
  3. 优化了对点分隔符模块名称的处理,能够更好地映射到文件系统路径
  4. 添加了详细的调试日志输出,便于排查脚本加载问题

应用场景

  • 在GameFeature插件中使用Lua脚本
  • 简化多插件项目中的Lua模块组织
  • 支持常见的插件命名和目录结构约定

使用方法

蓝图只需实现UnLuaInterface接口并返回"PluginName.ModuleName"格式的模块名,
UnLua就能自动在以下位置查找对应的Lua脚本文件:

  • Plugins/GameFeatures/PluginName/Content/Script/PluginName/ModuleName.lua
  • Plugins/PluginName/Content/Script/PluginName/ModuleName.lua
  • Plugins/GameFeatures/PluginName/Content/Script/ModuleName.lua
  • Plugins/PluginName/Content/Script/ModuleName.lua

@tencent-adm
Copy link
Member

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

3 participants