Replies: 1 comment 3 replies
-
Why no using But overall, I do not really understand the question. What code is generated with |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone!
I have some troubles implementing script engine inside game engine port from C++ to C#.
Original game uses luajit + luabind. There are scripts which are implementing UI, AI and some other entities.
Also it is possible to define own system, register callbacks and game engine will call them from its main loop (or when any specific event will occur).
I can't make changes in any of bundled scripts but can make some sort of preprocessor.
To export classes from native side I've copied binding example from this Issue and upgraded it a bit (using luabind sources as a reference).
I had to make a helper class to be able to call either native or overloaded methods in script-registered class.
Luabind
class "" ()
syntax works somehow, alsosuper()
for constructor.Main issue is to make calls to base native or scripted class. For example
or even
This tricky thing is made with upvalues in luabind but we have no upvalues in NeoLua so I have no idea how to mimic this behaivour.
Current messy script engine prototype is here in gist
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions