public static void OpenLuaLibs(IntPtr L) { if (LuaDLL.tolua_openlualibs(L) != 0) { string msg = LuaDLL.lua_tostring(L, -1); LuaDLL.lua_pop(L, 1); throw new LuaException(msg, null, 1); } LuaUnityLibs.SetOutMethods(L, "Vector3", new LuaCSFunction(LuaUnityLibs.GetOutVector3)); LuaUnityLibs.SetOutMethods(L, "Vector2", new LuaCSFunction(LuaUnityLibs.GetOutVector2)); LuaUnityLibs.SetOutMethods(L, "Vector4", new LuaCSFunction(LuaUnityLibs.GetOutVector4)); LuaUnityLibs.SetOutMethods(L, "Color", new LuaCSFunction(LuaUnityLibs.GetOutColor)); LuaUnityLibs.SetOutMethods(L, "Quaternion", new LuaCSFunction(LuaUnityLibs.GetOutQuaternion)); LuaUnityLibs.SetOutMethods(L, "Ray", new LuaCSFunction(LuaUnityLibs.GetOutRay)); LuaUnityLibs.SetOutMethods(L, "Bounds", new LuaCSFunction(LuaUnityLibs.GetOutBounds)); LuaUnityLibs.SetOutMethods(L, "Touch", new LuaCSFunction(LuaUnityLibs.GetOutTouch)); LuaUnityLibs.SetOutMethods(L, "RaycastHit", new LuaCSFunction(LuaUnityLibs.GetOutRaycastHit)); LuaUnityLibs.SetOutMethods(L, "LayerMask", new LuaCSFunction(LuaUnityLibs.GetOutLayerMask)); }
public static void OpenLibs(IntPtr L) { LuaUnityLibs.InitMathf(L); LuaUnityLibs.InitLayer(L); }