using System; using System.Collections.Generic; using UnityEngine; using System.IO; namespace YLSJ { /// /// 常量定义 /// public class Constant { /// /// AssetBundle后缀 /// public const string AssetBundleURE = ".unity3d"; /// /// 符号集名称 /// public const string AssemblyName = "Core"; /// /// 符号集入口 /// public const string AssemblyEntry = "Main"; /// /// 符号集文件完整路径 /// public static string AssemblyFilePath { get { string persistentDataPath = Application.persistentDataPath + "/Res/" + AssemblyName + AssetBundleURE; if (Application.isEditor) { if (File.Exists(persistentDataPath)) { return persistentDataPath; } return Application.streamingAssetsPath + "/Res/" + AssemblyName + AssetBundleURE; } // 非编辑器模式下,查找沙盒即可 return Application.persistentDataPath + "/Res/" + AssemblyName + AssetBundleURE; } } } }