static int GetMainMaterial(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckUnityObject(L, 1, typeof(UnityEngine.GameObject)); UnityEngine.Material o = UnGfx.GetMainMaterial(arg0); ToLua.Push(L, o); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }