public bool GetMetatable(int idx) { var val = _stack.Get(idx); var mt = LuaValue.GetMetatable(val, this); if (mt == null) { return(false); } _stack.Push(mt); return(true); }
private object GetMetafield(object val, string fieldName, LuaState ls) { var mt = LuaValue.GetMetatable(val, ls); return(mt?.Get(fieldName)); }