mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-30 13:38:46 +00:00
@@ -156,14 +156,14 @@ namespace YooAsset
|
||||
YooLogger.Warning($"Invalid parameter : {name}");
|
||||
}
|
||||
}
|
||||
public virtual void OnCreate(string packageName, string rootDirectory)
|
||||
public virtual void OnCreate(string packageName, string packageRoot)
|
||||
{
|
||||
PackageName = packageName;
|
||||
|
||||
if (string.IsNullOrEmpty(rootDirectory))
|
||||
rootDirectory = GetDefaultBuildinRoot();
|
||||
|
||||
_packageRoot = PathUtility.Combine(rootDirectory, packageName);
|
||||
if (string.IsNullOrEmpty(packageRoot))
|
||||
_packageRoot = GetDefaultBuildinPackageRoot(packageName);
|
||||
else
|
||||
_packageRoot = packageRoot;
|
||||
|
||||
// 创建解压文件系统
|
||||
var remoteServices = new DefaultUnpackRemoteServices(_packageRoot);
|
||||
@@ -282,9 +282,10 @@ namespace YooAsset
|
||||
}
|
||||
|
||||
#region 内部方法
|
||||
protected string GetDefaultBuildinRoot()
|
||||
protected string GetDefaultBuildinPackageRoot(string packageName)
|
||||
{
|
||||
return YooAssetSettingsData.GetYooMobileBuildinRoot();
|
||||
string rootDirectory = YooAssetSettingsData.GetYooMobileBuildinRoot();
|
||||
return PathUtility.Combine(rootDirectory, packageName);
|
||||
}
|
||||
public string GetBuildinFileLoadPath(PackageBundle bundle)
|
||||
{
|
||||
|
||||
@@ -26,7 +26,8 @@ namespace YooAsset
|
||||
DirectoryInfo rootDirectory = new DirectoryInfo(rootPath);
|
||||
if (rootDirectory.Exists == false)
|
||||
{
|
||||
throw new System.Exception($"Can not found StreamingAssets root directory : {rootPath}");
|
||||
UnityEngine.Debug.LogWarning($"Can not found StreamingAssets root directory : {rootPath}");
|
||||
return;
|
||||
}
|
||||
|
||||
// 搜索所有Package目录
|
||||
|
||||
@@ -73,8 +73,7 @@ namespace YooAsset
|
||||
#if UNITY_EDITOR
|
||||
// 兼容性初始化
|
||||
// 说明:内置文件系统在编辑器下运行时需要动态生成
|
||||
string buildinRoot = YooAssetSettingsData.GetYooEditorBuildinRoot();
|
||||
string packageRoot = PathUtility.Combine(buildinRoot, _fileSystem.PackageName);
|
||||
string packageRoot = _fileSystem.FileRoot;
|
||||
DefaultBuildinFileSystemBuild.CreateBuildinCatalogFile(_fileSystem.PackageName, packageRoot);
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user