public static ReadyConfig GetReadConfig(string filePath) { if (!reads.ContainsKey(filePath)) { reads [filePath] = new ReadyConfig(); reads [filePath].ReadFile(filePath); } return(reads [filePath]); }
void Awake() { _instance = this; GameObject.DontDestroyOnLoad(this.gameObject); Application.runInBackground = true; #if UNITY_EDITOR ReadyConfig lua_config = ReadyConfig.GetReadConfig(Application.dataPath + "/Client/lua_config.txt"); string open_lua_socket = lua_config.datas["open_lua_socket"]; string open_zbs_debugger = lua_config.datas["open_zbs_debugger"]; LuaConst.openLuaSocket = open_lua_socket == "1"; LuaConst.openZbsDebugger = open_zbs_debugger == "1"; #endif }