mirror of https://github.com/tuyoogame/YooAsset
update resource package
parent
1313e05d5d
commit
9476bbe562
|
@ -4,11 +4,22 @@ namespace YooAsset
|
|||
/// <summary>
|
||||
/// 默认的构建管线
|
||||
/// </summary>
|
||||
public class DefaultBuildPipeline
|
||||
public enum EDefaultBuildPipeline
|
||||
{
|
||||
public const string BuiltinBuildPipelineName = "BuiltinBuildPipeline";
|
||||
public const string ScriptableBuildPipelineName = "ScriptableBuildPipeline";
|
||||
public const string RawFileBuildPipelineName = "RawFileBuildPipeline";
|
||||
/// <summary>
|
||||
/// 内置构建管线
|
||||
/// </summary>
|
||||
BuiltinBuildPipeline,
|
||||
|
||||
/// <summary>
|
||||
/// 可编程构建管线
|
||||
/// </summary>
|
||||
ScriptableBuildPipeline,
|
||||
|
||||
/// <summary>
|
||||
/// 原生文件构建管线
|
||||
/// </summary>
|
||||
RawFileBuildPipeline,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -382,12 +382,12 @@ namespace YooAsset
|
|||
else
|
||||
{
|
||||
#if UNITY_WEBGL
|
||||
if (bundleInfo.Bundle.Buildpipeline== DefaultBuildPipeline.RawFileBuildPipelineName)
|
||||
if (bundleInfo.Bundle.Buildpipeline== EDefaultBuildPipeline.RawFileBuildPipeline.ToString())
|
||||
loader = new RawBundleWebLoader(this, bundleInfo);
|
||||
else
|
||||
loader = new AssetBundleWebLoader(this, bundleInfo);
|
||||
#else
|
||||
if (bundleInfo.Bundle.Buildpipeline == DefaultBuildPipeline.RawFileBuildPipelineName)
|
||||
if (bundleInfo.Bundle.Buildpipeline == EDefaultBuildPipeline.RawFileBuildPipeline.ToString())
|
||||
loader = new RawBundleFileLoader(this, bundleInfo);
|
||||
else
|
||||
loader = new AssetBundleFileLoader(this, bundleInfo);
|
||||
|
|
|
@ -19,6 +19,14 @@ namespace YooAsset
|
|||
return manifestFilePath;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编辑器下模拟构建清单
|
||||
/// </summary>
|
||||
public static string SimulateBuild(EDefaultBuildPipeline buildPipeline, string packageName)
|
||||
{
|
||||
return SimulateBuild(buildPipeline.ToString(), packageName);
|
||||
}
|
||||
|
||||
private static object InvokePublicStaticMethod(System.Type type, string method, params object[] parameters)
|
||||
{
|
||||
var methodInfo = type.GetMethod(method, BindingFlags.Public | BindingFlags.Static);
|
||||
|
|
|
@ -1120,7 +1120,7 @@ namespace YooAsset
|
|||
[Conditional("DEBUG")]
|
||||
private void DebugCheckRawFileLoadMethod(string method)
|
||||
{
|
||||
if (_playModeImpl.ActiveManifest.BuildPipeline != DefaultBuildPipeline.RawFileBuildPipelineName)
|
||||
if (_playModeImpl.ActiveManifest.BuildPipeline != EDefaultBuildPipeline.RawFileBuildPipeline.ToString())
|
||||
{
|
||||
throw new Exception($"Cannot load asset bundle file using {method} method !");
|
||||
}
|
||||
|
@ -1129,7 +1129,7 @@ namespace YooAsset
|
|||
[Conditional("DEBUG")]
|
||||
private void DebugCheckAssetLoadMethod(string method)
|
||||
{
|
||||
if (_playModeImpl.ActiveManifest.BuildPipeline == DefaultBuildPipeline.RawFileBuildPipelineName)
|
||||
if (_playModeImpl.ActiveManifest.BuildPipeline == EDefaultBuildPipeline.RawFileBuildPipeline.ToString())
|
||||
{
|
||||
throw new Exception($"Cannot load raw file using {method} method !");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue