public static void InitStaticData() { if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer || PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.pc) { int_load_AB_nums = 100; } else { int_load_AB_nums = 0; } int mem = SystemInfo.systemMemorySize; #if UNITY_EDITOR //QualitySettings.currentLevel = QualityLevel.Fastest; //Quality = Run_Quality.POOL; QualitySettings.currentLevel = QualityLevel.Good; Quality = Run_Quality.GOOD; #elif UNITY_STANDALONE_WIN if (mem <= 4400) { QualitySettings.currentLevel = QualityLevel.Fastest; Quality = Run_Quality.POOL; } else { QualitySettings.currentLevel = QualityLevel.Good; Quality = Run_Quality.GOOD; } #elif UNITY_IOS if (mem <= 1100) { QualitySettings.currentLevel = QualityLevel.Fastest; Quality = Run_Quality.POOL; } else { QualitySettings.currentLevel = QualityLevel.Good; Quality = Run_Quality.GOOD; } #elif UNITY_ANDROID if (mem <= 3300) { QualitySettings.currentLevel = QualityLevel.Fastest; Quality = Run_Quality.POOL; } else { QualitySettings.currentLevel = QualityLevel.Good; Quality = Run_Quality.GOOD; } #else #endif Debug.Log("Quality :" + Quality); cameraBackAxisPosition = Vector3.zero; cameraBackAxisRotation = Vector3.zero; currentState = RunState.Loading; currentModle = ModleChoose.MainModel; Difficult_Index = 0; data_list_count = 0; tableCount = 15; // app_json_str = ""; filePath = Application.persistentDataPath + "/"; #if UNITY_EDITOR if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer || PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.WeiKePlayer) { platform = asset_platform.pc; fileLocalStreamingPath = "file://" + Application.streamingAssetsPath + "/"; filePath = Application.streamingAssetsPath + "/"; } else if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.demo_pc || PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.pc) { platform = asset_platform.pc; fileLocalStreamingPath = Application.streamingAssetsPath + "/"; filePath = Application.persistentDataPath.Substring(0, Application.persistentDataPath.LastIndexOf("AppData") + 7) + "/roaming/Vesal_unity_PC/"; } else if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.plugin) { platform = asset_platform.pc; fileLocalStreamingPath = "file://" + Application.streamingAssetsPath + "/"; filePath = Application.persistentDataPath.Substring(0, Application.persistentDataPath.LastIndexOf("AppData") + 7) + "/roaming/Vesal/"; } else { platform = asset_platform.android; fileLocalStreamingPath = "file://" + Application.streamingAssetsPath + "/"; } #elif UNITY_IOS platform = asset_platform.ios; fileLocalStreamingPath = "file://" + Application.dataPath + "/Raw/"; #elif UNITY_ANDROID platform = asset_platform.android; fileLocalStreamingPath = "jar:file://" + Application.dataPath + "!/assets/"; #elif UNITY_STANDALONE_WIN platform = asset_platform.pc; fileLocalStreamingPath = Application.streamingAssetsPath + "/"; //filePath = Application.persistentDataPath.Substring(0, Application.persistentDataPath.LastIndexOf("AppData") + 7) + "/roaming/Vesal_unity_PC/"; if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer || PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.WeiKePlayer) { filePath = Vesal_DirFiles.get_dir_from_full_path(Application.dataPath) + "PptPlayer_Data/StreamingAssets/"; } else { filePath = Application.persistentDataPath.Substring(0, Application.persistentDataPath.LastIndexOf("AppData") + 7) + "/roaming/Vesal_unity_PC/"; } Debug.Log("UNITY_STANDALONE_WIN filePath:" + filePath); #endif tempPath = filePath + "temp/"; Vesal_DirFiles.DelFile(tempPath + "temp.dat"); vesal_db_path = filePath + "db/"; sign_texture_path = filePath + "sign_texture/"; UpdatePath = filePath + "Update/"; SignPath = filePath + "Android_sign/"; ModelPath = filePath + "model/"; MedicalPath = filePath + "Mediacl/"; xluaPath = filePath + "Lua-HotFix/"; TimelineFilePath = filePath + "Anim_Timeline/"; WeiKePlayer_path = filePath + "microlesson/"; Video_path = filePath + "acu_vdo/"; Anim_TimelinePath = filePath + "Anim_Timeline/"; BookMarkPath = filePath + "BookmarkFile/"; if (Quality == Run_Quality.GOOD) { MAX_Ab_num = 15; } else { MAX_Ab_num = 10; } #if UNITY_DEBUG // get_server_interface = "http://api.vesal.cn:8000/vesal-jiepao-prod/server?type=0"; get_server_interface = "http://118.24.119.234:8083/vesal-jiepao-test/server?type=0"; #else //get_server_interface = "http://api.vesal.cn:8000/vesal-jiepao-prod/server?type=0";//正式服 get_server_interface = "http://114.115.210.145:8083/vesal-jiepao-test/server?type=0";//测试服 #endif fix_server_interface = "v1/app/member/getCode"; //server_ip = vesal_network.Vesal_Network.get_ipfromlist(get_server_interface); //server_test_url = server_ip + fix_server_interface; online_mode = true; is_enter_server_control = false; // isLanScaple = true; // isLanScaple = true; DataManagerStatus = DataIntState.Null; is_has_app_buff = false; isRotateScreen = false; DebugLog.DebugLogInfo("---------------设备内存-------------------" + mem); }
public static void InitStaticData() { int mem = SystemInfo.systemMemorySize; #if UNITY_EDITOR //QualitySettings.currentLevel = QualityLevel.Fastest; //Quality = Run_Quality.POOL; QualitySettings.currentLevel = QualityLevel.Good; Quality = Run_Quality.GOOD; #elif UNITY_STANDALONE_WIN if (mem <= 4400) { QualitySettings.currentLevel = QualityLevel.Fastest; Quality = Run_Quality.POOL; } else { QualitySettings.currentLevel = QualityLevel.Good; Quality = Run_Quality.GOOD; } #elif UNITY_IOS if (mem <= 1100) { QualitySettings.currentLevel = QualityLevel.Fastest; Quality = Run_Quality.POOL; } else { QualitySettings.currentLevel = QualityLevel.Good; Quality = Run_Quality.GOOD; } #elif UNITY_ANDROID if (mem <= 3300) { QualitySettings.currentLevel = QualityLevel.Fastest; Quality = Run_Quality.POOL; } else { QualitySettings.currentLevel = QualityLevel.Good; Quality = Run_Quality.GOOD; } #else #endif Debug.Log("Quality :" + Quality); cameraBackAxisPosition = Vector3.zero; cameraBackAxisRotation = Vector3.zero; currentState = RunState.Loading; currentModle = ModleChoose.MainModel; Difficult_Index = 0; data_list_count = 0; tableCount = 15; filePath = Application.persistentDataPath + "/"; #if UNITY_EDITOR fileLocalStreamingPath = "file://" + Application.streamingAssetsPath + "/"; filePath = Application.streamingAssetsPath + "/"; #elif UNITY_IOS fileLocalStreamingPath = "file://" + Application.dataPath + "/Raw/"; #elif UNITY_ANDROID fileLocalStreamingPath = "jar:file://" + Application.dataPath + "!/assets/"; #elif UNITY_STANDALONE_WIN fileLocalStreamingPath = Application.streamingAssetsPath + "/"; filePath = Application.persistentDataPath.Substring(0, Application.persistentDataPath.LastIndexOf("AppData") + 7) + "/roaming/Vesal_unity_PC/"; Debug.Log("UNITY_STANDALONE_WIN filePath:" + filePath); #endif tempPath = filePath + "temp/"; Vesal_DirFiles.DelFile(tempPath + "temp.dat"); vesal_db_path = filePath + "db/"; sign_texture_path = filePath + "sign_texture/"; UpdatePath = filePath + "Update/"; SignPath = filePath + "Android_sign/"; ModelPath = filePath + "model/"; MedicalPath = filePath + "Mediacl/"; xluaPath = filePath + "Lua-HotFix/"; TimelineFilePath = filePath + "Anim_Timeline/"; WeiKePlayer_path = filePath + "microlesson/"; Video_path = filePath + "acu_vdo/"; Anim_TimelinePath = filePath + "Anim_Timeline/"; BookMarkPath = filePath + "BookmarkFile/"; if (Quality == Run_Quality.GOOD) { MAX_Ab_num = 15; } else { MAX_Ab_num = 10; } //get_server_interface = "http://api.vesal.cn:8000/vesal-jiepao-prod/server?type=0";//正式服 get_server_interface = "http://114.115.210.145:8083/vesal-jiepao-test/server?type=0";//测试服 fix_server_interface = "v1/app/member/getCode"; online_mode = true; is_enter_server_control = false; is_has_app_buff = false; isRotateScreen = false; DebugLog.DebugLogInfo("---------------设备内存-------------------" + mem); }