Custom Lua with optional var

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
VernTheVanquisher
Posts: 5
Joined: Fri Jan 13, 2017 12:05 pm

Custom Lua with optional var

Post by VernTheVanquisher »

i've registered my own lua call but like some of yours i want it to have optional parameters. i've tried just writing my method with optional parameters but if i don't use all the parameters the lua doesn't sync with my method. i would create multiple overloads but i read we shouldn't have multiple registered functions with the same name? any help would be appreciated. thanks in advance.
User avatar
Tony Li
Posts: 22062
Joined: Thu Jul 18, 2013 1:27 pm

Re: Custom Lua with optional var

Post by Tony Li »

Sorry, C# functions registered with Lua don't support overloads or optional parameters. You'll have to register them as different function names.
VernTheVanquisher
Posts: 5
Joined: Fri Jan 13, 2017 12:05 pm

Re: Custom Lua with optional var

Post by VernTheVanquisher »

good to know. thanks
Post Reply