rdeioris / LuaMachine

Unreal Engine Plugin for Lua APIs implementation
MIT License
581 stars 120 forks source link

Multiple states from different files? #30

Open markusstephanides opened 3 years ago

markusstephanides commented 3 years ago

Hi!

Thanks for the library!

In our use case we would need to be able to load multiple lua scripts which all use the same state class but not the same state. If I understood the code correctly, currently there is only one state per state class possible.

Is that correct or is there a way around it?

rdeioris commented 3 years ago

Hi, this patch should do the trick: https://github.com/rdeioris/LuaMachine/pull/27

(will be merged soon)

markusstephanides commented 3 years ago

Thanks!

I ended up finding that PR and using it for my own fork to enable support for UE 4.27+ if you want to check it out :) https://github.com/markusstephanides/LuaMachine

tfabretti commented 1 year ago

Hey, mate, sorry to bother you but did you get time to look at that PR or should we still fork to try to merge it ourselves ?

rdeioris commented 1 year ago

@tfabretti dynamic states have been merged some week ago: https://github.com/rdeioris/LuaMachine/blob/master/Source/LuaMachine/Public/LuaBlueprintFunctionLibrary.h#L416

a bunch of features are still not exposed to blueprints, but eventually you should be able to use them in C++

tfabretti commented 1 year ago

Oh, that's great ! I'm gonna take a look at that to understand how it works. Thank you <3