Code Monkey home page Code Monkey logo

Comments (6)

scriptkitz avatar scriptkitz commented on May 29, 2024

而且也不能通过只修改自己项目源码达到目的,
因为老的蓝图引用的 slua_unreal.LuaPawn这种路径,所以只能修改
插件slua的源码。

from sluaunreal.

zjhongxian avatar zjhongxian commented on May 29, 2024

如果是蓝图API,得重新给加回来,如果是C++代码的话使用CallLuaFunction :
"RET CallLuaFunction(const FString& FunctionName, ARGS&& ...Args)"
它传多参数时使用上更加友好。

from sluaunreal.

zjhongxian avatar zjhongxian commented on May 29, 2024

“蓝图资源太多都调用了CallLuaMember” 这种我们一般安排人员把它用Lua重写来达到更好的可维护状态,建议项目组开发一个“蓝图转Lua”工具批量去做。

我们项目里面有同学做了类似工具,是基于蓝图节点去做的,可用,但是也要人工修复下。

我个人的看法是做个基于字节码的 蓝图 =》lua 转换工具,应该是可以做到即转即用的

from sluaunreal.

scriptkitz avatar scriptkitz commented on May 29, 2024

如果是蓝图API,得重新给加回来,如果是C++代码的话使用CallLuaFunction : "RET CallLuaFunction(const FString& FunctionName, ARGS&& ...Args)" 它传多参数时使用上更加友好。

我最开始也是准备调用CallLuaFunction ,但如果用CallLuaFunction<FLuaBPvar>(...), 这样的话不行,
编译报错DeduceType<X>::value未定义,如果用一般类型比如CallLuaFunction<int>(...)就可以,
但这里必须用FLuaBPvar类型才能给蓝图调用,可能要用宏DefDeduceType添加个类型?不确定啊。。

最后先调用了return ULuaBlueprintLibrary::CallToLuaWithArgs(this, FunctionName, Args, TEXT(""));,
还不知道有没问题,反正编译过了。。。

from sluaunreal.

scriptkitz avatar scriptkitz commented on May 29, 2024

“蓝图资源太多都调用了CallLuaMember” 这种我们一般安排人员把它用Lua重写来达到更好的可维护状态,建议项目组开发一个“蓝图转Lua”工具批量去做。

我们项目里面有同学做了类似工具,是基于蓝图节点去做的,可用,但是也要人工修复下。

我个人的看法是做个基于字节码的 蓝图 =》lua 转换工具,应该是可以做到即转即用的

这也太麻烦了, 我直接修改slua源码,加回原来的名字更快捷😄

from sluaunreal.

zjhongxian avatar zjhongxian commented on May 29, 2024

嗯,这样兼容过渡也是一种方式,工具开发需要不少时间

from sluaunreal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.