protected bool IsContainsAsset(AssetGroupData assetGroup, string relativePath)
 {
     if (assetGroup == null)
     {
         return(false);
     }
     for (int i = 0; i < assetGroup.AssetFilesList.Count; i++)
     {
         if (assetGroup.AssetFilesList[i].AssetPath == relativePath)
         {
             return(true);
         }
     }
     return(false);
 }
        protected void AddAssetData(string key, string relativePath)
        {
            //string assetPath = AssetDatabase.GUIDToAssetPath(relativePath);
            if (string.IsNullOrEmpty(relativePath))
            {
                Debug.Log("Asset not found!!  SourceName:" + key + "   Path : " + relativePath);
                return;
            }

            AssetFileData asset = new AssetFileData();

            asset.GUID      = AssetDatabase.AssetPathToGUID(relativePath);
            asset.AssetPath = relativePath;
            asset.AssetName = key;

            AssetGroupData assetGroup = DuplicationAssetGroupDic.ContainsKey(key) ? DuplicationAssetGroupDic[key] : null;

            if (assetGroup == null)
            {
                assetGroup           = new AssetGroupData(key);
                assetGroup.IsChoosed = true;
                asset.IsChoosed      = true;
                assetGroup.AssetFilesList.Add(asset);
                DuplicationAssetGroupDic.Add(key, assetGroup);
            }
            else
            {
                if (IsContainsAsset(key, relativePath))
                {
                    Debug.LogError("Guid Duplication!!  SourceName:" + key);
                }
                asset.IsChoosed = false;
                DuplicationAssetGroupDic[key].AssetFilesList.Add(asset);
            }
            asset.OnChoosedChanged  = assetGroup.UpdateSubAssetsToggle;
            asset.OnPreviousChanged = OnPreviousChanged;
        }
        protected bool IsContainsAsset(string key, string relativePath)
        {
            AssetGroupData duplicaionAsset = DuplicationAssetGroupDic[key];

            return(IsContainsAsset(duplicaionAsset, relativePath));
        }