LuaConst.cs 1.2 KB

123456789101112131415161718192021222324252627282930
  1. using UnityEngine;
  2. public static class LuaConst
  3. {
  4. public static string luaDir = Application.dataPath + "/Lua"; //lua逻辑代码目录
  5. public static string toluaDir = Application.dataPath + "/ToLua/Lua"; //tolua lua文件目录
  6. #if UNITY_STANDALONE
  7. public static string osDir = "Win";
  8. #elif UNITY_ANDROID
  9. public static string osDir = "Android";
  10. #elif UNITY_IPHONE
  11. public static string osDir = "iOS";
  12. #else
  13. public static string osDir = "";
  14. #endif
  15. public static string luaResDir = string.Format("{0}/{1}/Lua", Application.persistentDataPath, osDir); //手机运行时lua文件下载目录
  16. #if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN
  17. public static string zbsDir = "D:/ZeroBraneStudio/lualibs/mobdebug"; //ZeroBraneStudio目录
  18. #elif UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
  19. public static string zbsDir = "/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/lualibs/mobdebug";
  20. #else
  21. public static string zbsDir = luaResDir + "/mobdebug/";
  22. #endif
  23. public static bool openLuaSocket = true; //是否打开Lua Socket库
  24. public static bool openLuaDebugger = false; //是否连接lua调试器
  25. }