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:

Code:
namespace PointClick
{
    class GameController : DrawableGameComponent
    {
        public string gcname;
 
        public GameController(Game game)
            : base(game)
        {
            this.gcname = "Pulled from gc";
        }
     }
 }
Here is my lua code:
Code:
luanet.load_assembly ("PointClick.GameController");
luanet.load_assembly ("Microsoft.Xna.Framework.Game");
luanet.load_assembly ("Microsoft.Xna.Framework");
 
  Console.WriteLine(gObj.gcname);
  gObj2 = luanet.import_type("PointClick.GameController"); 
  gObj2.gcname=" to this";
  gObj= gObj2;
Thanks in advance.