Lua 5.1 codegenerator for UE4

I have make an experimental plugin recently.

It can be used to generate lua binding code for UE4 Engine.

It can export UCLASS, USTRUCT, UENUM to lua environment.So you can write game logic by lua.

All my work are base on the official plugin ScriptPlugin. There is the link https://forums.unrealengine.com/show…ns-via-plugins

This is my github repository, GitHub - asqbtcupid/unreal.lua: lua solution for UnrealEngine4.

I also make a debugger for lua base ue4 slate,So debug lua is quite esay.

welcome to share idea or give advise if you have any.Thank you.

I have made some updated last few day.

I try to Export slate, slatecore and UMG module to lua, It’s done without problem.

lua can be used to write UMG logic derectly.

And I Export some proxy class for multicastdelegate, So now lua function can be added to c++ multicastdelegate for callback, It’s quite useful, doesn’t it?

great works!

Has development stalled on this plugin?

There hasn’t been a commit in 3 months and we’re on 4.15 now.

The Newest one is lay on my Disk,It’s more faster on complie and easier to use.There are some improvement in branch demo_CatchMe and the git reposity name “CM”.But don’t try to implement them.I notice there are compile error in 4.15,But I don’t have time to take look at it.I will keep Improving the plugin, thanks.

Do you know if it’s possible to use a plugin like this with a launcher engine? I tried, but it doesn’t seem to build the uht part if you don’t build the entire engine from source.

I have no idea why laucher engine can’t build this plugin autoly.But I found a way to do it.

1.create an empty c++ project
2.Put this plugin into it.
3.Open Editor, Go to Setting->Plugins->Project Examples->ljh Lua Plugin, then click package,choose a folder to package to.
4.after package you can find the binary stuff in the package folder you choose, Copy them to the project you use.

Just figured out a solution for our project, it should work for yours aswell!
Add something like this to your .uproject file and it will build the UHT plugin automatically:



"PreBuildSteps":
{
    "Win64":
    
        "\"$(EngineDir)/Build/BatchFiles/Build.bat\" UnrealHeaderTool Win64 Development -module LuaBindingGenerator -plugin \"$(ProjectDir)/Plugins/LuaIntegration/LuaIntegration.uplugin\" -NoMutex"
    ]
}


It’s not ideal because it will regenerate the makefile for UHT every single time, but much better than doing it manually.

Thank you Zeblote,But I work with source code build engine,I will test this later.By the way i just uploaded a 4.16 version to git.

I try to avoid source engine as much as possible, it kept accidently rebuilding the entire thing at the worst moments… :smiley:

good job!!!

thank you!

does this have to be in a c++ project to work? after compiling from github and moving the 2 folders i tried adding it to my blueprint project and its a no go. it keeps saying the dll is missing.

yes, It only work for c++ project.If you manually build the dll out.it may work for blueprint project.

Good job! Do you use LuaJIT 2.0.0 x64?