/// <summary>
    /// 获取非Shader的内置资源引用
    /// </summary>
    /// <param name="asset"></param>
    /// <returns></returns>
    private List <UnityEngine.Object> getReferenceBuildInResourceExcludeShader(UnityEngine.GameObject asset)
    {
        // 主要提起以下几种资源:
        // 1. 内置Texture
        // 2. 内置材质
        // 人物模型和粒子特效
        var assetlist  = new List <UnityEngine.Object>();
        var allrenders = asset.GetComponentsInChildren <Renderer>();

        foreach (var render in allrenders)
        {
            if (render.sharedMaterial != null && EditorResourceUtilities.isBuildInResource(render.sharedMaterial))
            {
                assetlist.Add(render.sharedMaterial);
            }
        }
        // UI组件
        var allgraphics = asset.GetComponentsInChildren <Graphic>();

        foreach (var graphic in allgraphics)
        {
            if (graphic.material != null && EditorResourceUtilities.isBuildInResource(graphic.material))
            {
                assetlist.Add(graphic.material);
            }
            if (graphic.mainTexture != null && EditorResourceUtilities.isBuildInResource(graphic.mainTexture))
            {
                assetlist.Add(graphic.mainTexture);
            }
        }
        return(assetlist);
    }
 /// <summary>
 /// 指定材质是否使用了内置资源
 /// </summary>
 /// <param name="asset"></param>
 /// <param name="assetinfolist"></param>
 /// <returns></returns>
 private bool isUsingBuildInResource <T>(T asset, ref List <KeyValuePair <string, string> > assetinfolist) where T : UnityEngine.Object
 {
     assetinfolist.Clear();
     if (typeof(T) == typeof(Material))
     {
         var mat = asset as Material;
         if (mat.shader != null && EditorResourceUtilities.isBuildInResource(mat.shader))
         {
             assetinfolist.Add(new KeyValuePair <string, string>("无", mat.shader.name));
             return(true);
         }
         else
         {
             return(false);
         }
     }
     else if (typeof(T) == typeof(GameObject))
     {
         var prefab = asset as GameObject;
         // 人物模型和粒子特效
         var allrenders             = prefab.GetComponentsInChildren <Renderer>();
         var isusingbuildinresource = false;
         foreach (var render in allrenders)
         {
             //用到的内置asset名(采用拼凑的方式 e.g. Default.mat Sprite.png)
             var usedassetname = string.Empty;
             if (render.sharedMaterial != null)
             {
                 if (EditorResourceUtilities.isBuildInResource(render.sharedMaterial))
                 {
                     usedassetname         += render.sharedMaterial.name;
                     isusingbuildinresource = true;
                 }
                 if (render.sharedMaterial.shader != null)
                 {
                     if (EditorResourceUtilities.isBuildInResource(render.sharedMaterial.shader))
                     {
                         usedassetname         += " " + render.sharedMaterial.shader.name;
                         isusingbuildinresource = true;
                     }
                 }
                 if (!usedassetname.IsNullOrEmpty())
                 {
                     assetinfolist.Add(new KeyValuePair <string, string>(render.transform.name, usedassetname));
                 }
             }
         }
         // UI组件
         var allgraphics = prefab.GetComponentsInChildren <Graphic>();
         foreach (var graphic in allgraphics)
         {
             //用到的内置asset名(采用拼凑的方式 e.g. Default.mat Sprite.png)
             var usedassetname = string.Empty;
             if (graphic.material != null)
             {
                 if (EditorResourceUtilities.isBuildInResource(graphic.material))
                 {
                     usedassetname         += graphic.material.name;
                     isusingbuildinresource = true;
                 }
                 if (graphic.material.shader != null)
                 {
                     if (EditorResourceUtilities.isBuildInResource(graphic.material.shader))
                     {
                         usedassetname         += " " + graphic.material.shader.name;
                         isusingbuildinresource = true;
                     }
                 }
             }
             if (graphic.mainTexture != null)
             {
                 if (EditorResourceUtilities.isBuildInResource(graphic.mainTexture))
                 {
                     usedassetname         += " " + graphic.mainTexture.name;
                     isusingbuildinresource = true;
                 }
             }
             if (!usedassetname.IsNullOrEmpty())
             {
                 assetinfolist.Add(new KeyValuePair <string, string>(graphic.transform.name, usedassetname));
             }
         }
         return(isusingbuildinresource);
     }
     else
     {
         return(false);
     }
 }