update editor code

非原生文件收集器自动移除Unity无法识别的文件。
pull/51/head
hevinci 2022-11-26 17:54:42 +08:00
parent dcd606e573
commit cd62686316
2 changed files with 9 additions and 5 deletions

View File

@ -1,4 +1,5 @@
using UnityEditor;
using UnityEngine;
namespace YooAsset.Editor
{
@ -9,6 +10,7 @@ namespace YooAsset.Editor
/// </summary>
public static string SimulateBuild(string packageName)
{
Debug.Log($"Begin to create simulate package : {packageName}");
string defaultOutputRoot = AssetBundleBuilderHelper.GetDefaultOutputRoot();
BuildParameters buildParameters = new BuildParameters();
buildParameters.OutputRoot = defaultOutputRoot;

View File

@ -240,13 +240,15 @@ namespace YooAsset.Editor
return false;
// 忽略Unity无法识别的无效文件
/*
if (type == typeof(UnityEditor.DefaultAsset))
// 注意:只对非原生文件收集器处理
if(PackRuleName != nameof(PackRawFile))
{
UnityEngine.Debug.LogWarning($"Cannot pack default asset : {assetPath}");
return false;
if (type == typeof(UnityEditor.DefaultAsset))
{
UnityEngine.Debug.LogWarning($"Cannot pack default asset : {assetPath}");
return false;
}
}
*/
string fileExtension = System.IO.Path.GetExtension(assetPath);
if (IsIgnoreFile(fileExtension))