1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- using System;
- using System.Collections.Generic;
- using UnityEngine;
- using System.IO;
- namespace YLSJ
- {
- /// <summary>
- /// 常量定义
- /// </summary>
- public class Constant
- {
- /// <summary>
- /// AssetBundle后缀
- /// </summary>
- public const string AssetBundleURE = ".unity3d";
- /// <summary>
- /// 符号集名称
- /// </summary>
- public const string AssemblyName = "Core";
- /// <summary>
- /// 符号集入口
- /// </summary>
- public const string AssemblyEntry = "Main";
- /// <summary>
- /// 符号集文件完整路径
- /// </summary>
- 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;
- }
- }
- }
- }
|