#region Copyright RenGuiYou. All rights reserved. //===================================================== // NeatlyFrameWork // Author: RenGuiyou // Feedback: mailto:750539605@qq.com //===================================================== #endregion using UnityEngine; public class NeatlyConfig { //assetbundle缓存时间 public static int TIME_BUNDLE_CACHE = 10; //是否启用bundle模式 public static bool AssetBundleEnable = false; //音效数量 public const int SOUND_SOURCE_COUNT = 10; //默认音效 public const string NAME_DEFAULT_SOUND = "click"; //mainifest清单文件名 public const string NAME_MANIFEST = "bundle"; //AssetbundleMap名 public const string NAME_ASSETBUNDLE_MAP = "assetbundlemap"; //assets目录 public const string ASSETS_ROOT = "assets"; //data目录 public const string ASSET_DATA_ROOT = "assets/data"; //tp图集目录 public const string PATH_ATLAS_TP = "data/ui/atlas_tp/"; //UIPanel目录 public const string PATH_UI_PANEL = "data/ui/panel/"; //tp Bundle图集目录 public const string PATH_BUNDLE_ATLAS_TP = "data_ui_atlas_tp_"; //padding边数据 public const string PATH_ATLAS_CONFIG = "data/ui/atlasconfig"; //emoji目录名 public const string NAME_EMOJI_LIBRARY = "emoji"; //bundle资源后缀 public const string SUFFIX_BUNDLE = ".unity3d"; //音效资源后缀 public const string SUFFIX_SOUND = ".ogg"; //音乐资源后缀 public const string SUFFIX_MUSIC = ".mp3"; //视频资源后缀 public const string SUFFIX_VIDEO = ".mp4"; //场景 包名 public const string SCENE_PACKAGE = "scene"; //音效 包名 public const string SOUND_PACKAGE = "sound"; //音乐 包名 public const string MUSIC_PACKAGE = "music"; //视频 包名 public const string VIDEO_PACKAGE = "video"; //字体 包名 public const string FONT_PACKAGE = "font"; //是否64位程序 public static bool Is64Bit { get { return System.IntPtr.Size == 8; } } //lua x86包 public const string LUA_PACKAGE_32 = "lua32"; //lua x64包 public const string LUA_PACKAGE_64 = "lua64"; //lua 包名 public static string LUA_PACKAGE { get { return Is64Bit ? LUA_PACKAGE_64 : LUA_PACKAGE_32; } } //bundle 包名 public const string BUNDLE_PACKAGE = NAME_MANIFEST; //文件列表 public static readonly string TXT_FILE_LIST = "file_list.txt"; //文件manifest public static readonly string TXT_FILE_MANIFEST = "manifest.txt"; //包路径 #if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX public static readonly string PATH_PACKAGE = string.Format("{0}", Application.streamingAssetsPath); #elif UNITY_ANDROID public static readonly string PATH_PACKAGE = string.Format("{0}!assets", Application.dataPath ); #elif UNITY_IOS public static readonly string PATH_PACKAGE = string.Format("{0}", Application.streamingAssetsPath); #else public static readonly string PATH_PACKAGE = string.Format("{0}", Application.streamingAssetsPath); #endif public static readonly string PATH_PACKAGE_BUNDLE = string.Format("{0}/{1}", PATH_PACKAGE, BUNDLE_PACKAGE); public static readonly string PATH_PACKAGE_LUA = string.Format("{0}/lua/{1}", PATH_PACKAGE, LUA_PACKAGE); //更新包路径 public static readonly string PATH_UPDATE = string.Format("{0}/update", Application.persistentDataPath); public static readonly string PATH_UPDATE_BUNDLE = string.Format("{0}/{1}", PATH_UPDATE, BUNDLE_PACKAGE); public static readonly string PATH_UPDATE_LUA = string.Format("{0}/lua", PATH_UPDATE); public static readonly string PATH_UPDATE_I18n = string.Format("{0}/i18n", PATH_UPDATE); //路径表 public static string[] ASSETS_PATHS = {PATH_UPDATE_BUNDLE}; //下载路径 public static readonly string PATH_DOWNLOAD = string.Format("{0}/download", Application.persistentDataPath); public static readonly string PATH_DOWNLOAD_LUA = string.Format("{0}/download/lua", Application.persistentDataPath); public static readonly string PATH_DOWNLOAD_BUNDLE = string.Format("{0}/download/bundle", Application.persistentDataPath); public static readonly string PATH_DOWNLOAD_TEXTURE = string.Format("{0}/download/texture", Application.persistentDataPath); // 安卓临时目录 public static readonly string PATH_ANDROID_PACKAGE_TEMP = string.Format("{0}/temp_res", Application.persistentDataPath); public static readonly string PATH_ANDROID_PACKAGE_TEMP_BUNDLE = string.Format("{0}/{1}", PATH_ANDROID_PACKAGE_TEMP, BUNDLE_PACKAGE); public static readonly string PATH_ANDROID_PACKAGE_TEMP_LUA = string.Format("{0}/{1}", PATH_ANDROID_PACKAGE_TEMP, LUA_PACKAGE); }