Skip to content

Non static functions without userdata #262

Description

@MeikelLP

I noticed [LuaObject] generator the code is always generating the following line for non-static methods:

var userData = context.GetArgument<global::MyType>(0);

As you can see here

Sadly I have a lot of legacy scripts (Lua 3?) that do not use the colon syntax x:DoStuff() but rather the dot version x.DoStuff()

This should be fine from my Lua understanding as : is just syntactic sugar for inserting the object as self (ref)

Right now I don't see how I can customize this behavior. My current workaround is to write the objects myself.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions