using UnityEngine;
|
using System;
|
using System.IO;
|
|
public class ResourcesPath : Singleton<ResourcesPath>
|
{
|
public const string AssetDependentFileBundleName =
|
#if UNITY_ANDROID
|
"android";
|
#elif UNITY_IOS
|
"ios";
|
#else
|
"standalone";
|
#endif
|
|
public const string windowFileBundleName = "ui";
|
public const string uiprefabFileBundleName = "uicomp";
|
|
public readonly static string ResourcesOutPath = Application.dataPath + "/ResourcesOut/";
|
public const string ResourcesOutAssetPath = "Assets/ResourcesOut/";
|
public const string AssetDependentFileAssetName = "AssetBundleManifest";
|
public const string ABExtention = ".unity3d";
|
|
public readonly string StreamingAssetPath;
|
public readonly string ExternalStorePath;
|
|
#region 具体asset资源读取路径
|
|
public static readonly string MOB_FOLDER_NAME = "gmodels/";
|
|
public static readonly string EFFECT_Folder_Name = "effect/";
|
|
public static readonly string UI_SPRITE_SUFFIX = "Sprite";
|
public static readonly string UI_WINDOW_SUFFIX = "UI";
|
public static readonly string UI_FONT_SUFFIX = "Font";
|
public static readonly string UI_PREFAB_SUFFIX = "UIComp";
|
|
public static readonly string CONFIG_FODLER = ResourcesOutPath + "Config/";
|
|
public static readonly string AUDIO_SUFFIX = "Audio/";
|
public static readonly string VIDEO_SUFFIX = "Video/";
|
|
|
#endregion
|
|
public void Init()
|
{
|
}
|
|
public ResourcesPath()
|
{
|
#if UNITY_ANDROID
|
StreamingAssetPath = Application.streamingAssetsPath + "/android/";
|
#elif UNITY_IOS
|
StreamingAssetPath = Application.streamingAssetsPath + "/ios/";
|
#else
|
StreamingAssetPath = Application.streamingAssetsPath + "/standalone/";
|
#endif
|
|
if (!Application.isEditor)
|
{
|
switch (Application.platform)
|
{
|
case RuntimePlatform.WindowsPlayer:
|
ExternalStorePath = Path.GetDirectoryName(Application.streamingAssetsPath) + "/ExternalAssets/";
|
break;
|
default:
|
ExternalStorePath = Application.persistentDataPath + "/";
|
break;
|
}
|
}
|
else
|
{
|
ExternalStorePath = Application.persistentDataPath + "/";
|
}
|
|
Debug.Log("Stream Path: " + StreamingAssetPath);
|
Debug.Log("External Path: " + ExternalStorePath);
|
}
|
|
}
|