Files
TaiWan/Assets/Roaming/Scripts/BaseData/CommonData.cs

121 lines
2.3 KiB
C#
Raw Normal View History

2025-10-31 15:20:38 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class CommonData
{
public static string DataServer;
static CommonData()
{
// DataServer = "http://localhost";
DataServer = Application.streamingAssetsPath;
_mainCamera = Camera.main;
}
public static string DataPath = "/Data/";
public static string ImagePath = "/Image/";
static string LowImagePath = "Low/";
static string HighImagePath = "High0824/";
static string UIImagePath = "UI/";
static string SpotImagePath = "Spot0824/";
public static string VideoPath = "/Video/";
public static string GamePath = "/Game/";
static Camera _mainCamera;
public static Camera MainCamera
{
get
{
return _mainCamera;
}
}
public static string ImageFullPath
{
get
{
return DataServer + ImagePath;
}
}
public static string LowImageFullPath
{
get
{
return ImageFullPath + LowImagePath;
}
}
public static string HighImageFullPath
{
get
{
return ImageFullPath + HighImagePath;
}
}
public static string UIImageFullPath
{
get
{
return ImageFullPath + UIImagePath;
}
}
public static string SpotImageFullPath
{
get
{
return ImageFullPath + SpotImagePath;
}
}
public static string VideoFullPath
{
get
{
return DataServer + VideoPath;
}
}
public static string GameFullPath
{
get
{
return DataServer + GamePath;
}
}
public static string DataFullPath
{
get
{
return DataServer + DataPath;
}
}
/// <summary>
/// <20>ɵ<EFBFBD><C9B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public static float ClickDistance = 6.0f;
public static void ReleaseMemory()
{
Resources.UnloadUnusedAssets();
AssetBundle.UnloadAllAssetBundles(true);
System.GC.Collect();
//ImageLoader<Image>.ClearImage();
//ImageLoader<RawImage>.ClearImage();
//ImageLoader<Material>.ClearImage();
}
}