November 24th, 2013, 10:12 AM
Creating NET object from Lua
I'm having trouble accessing a C#.NET object in Lua. I can do this no problem with the System.Console type but this GameController object has another object in it's constructor so that may be the issue.
I get a nil assignment error in Lua when I try to access gObj2. I hope you guys can help.
Here is my c# code:
Here is my lua code:
class GameController : DrawableGameComponent
public string gcname;
public GameController(Game game)
this.gcname = "Pulled from gc";
Thanks in advance.
gObj2 = luanet.import_type("PointClick.GameController");
gObj2.gcname=" to this";