YooAsset/Assets/YooAsset/Runtime/InitializeParameters.cs

86 lines
1.8 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

namespace YooAsset
{
/// <summary>
/// 运行模式
/// </summary>
public enum EPlayMode
{
/// <summary>
/// 编辑器下的模拟模式
/// </summary>
EditorSimulateMode,
/// <summary>
/// 离线运行模式
/// </summary>
OfflinePlayMode,
/// <summary>
/// 联机运行模式
/// </summary>
HostPlayMode,
}
/// <summary>
/// 初始化参数
/// </summary>
public abstract class InitializeParameters
{
/// <summary>
/// 文件解密服务接口
/// </summary>
public IDecryptionServices DecryptionServices = null;
/// <summary>
/// 资源加载每帧处理的最大时间片段
/// 注意默认值为MaxValue
/// </summary>
public long LoadingMaxTimeSlice = long.MaxValue;
/// <summary>
/// 下载失败尝试次数
/// 注意默认值为MaxValue
/// </summary>
public int DownloadFailedTryAgain = int.MaxValue;
}
/// <summary>
/// 编辑器下模拟运行模式的初始化参数
/// </summary>
public class EditorSimulateModeParameters : InitializeParameters
{
/// <summary>
/// 用于模拟运行的资源清单路径
/// </summary>
public string SimulateManifestFilePath = string.Empty;
}
/// <summary>
/// 离线运行模式的初始化参数
/// </summary>
public class OfflinePlayModeParameters : InitializeParameters
{
}
/// <summary>
/// 联机运行模式的初始化参数
/// </summary>
public class HostPlayModeParameters : InitializeParameters
{
/// <summary>
/// 默认的资源服务器下载地址
/// </summary>
public string DefaultHostServer = string.Empty;
/// <summary>
/// 备用的资源服务器下载地址
/// </summary>
public string FallbackHostServer = string.Empty;
/// <summary>
/// 内置资源查询服务接口
/// </summary>
public IQueryServices QueryServices = null;
}
}