/// <summary>
 /// 把该rule应用到该文件上
 /// </summary>
 /// <param name="bundleRule"></param>
 private static void ApplyRuleToOneFile(AssetBundleRuleFindResult bundleRule)
 {
     // 如果直接在这里设置importer.assetBundleName的话, 会导致CacheServer Asset validation failed。
     // 应该是unity的bug。 只能绕过去了
     if (sDelayClearBundleNameList.Count == 0 && sDelayUpdateBundleNameList.Count == 0)
     {
         EditorApplication.update += Update;
     }
     sDelayUpdateBundleNameList.Add(bundleRule);
 }
    public static void ApplyRuleToOneFile(string assetPath)
    {
        AssetBundleRuleFindResult bundleRule = FindRuleForAsset(assetPath);

        if (bundleRule == null || bundleRule.Rule == null)
        {
            Debug.Log("No asset bundle rules found for asset");
            return;
        }

        ApplyRuleToOneFile(bundleRule);
    }