private bool GetBuildFileParams(AssetBundleData assetBundleData, string filePath, List <Object> assetObjectList, List <string> assetObjectNameList, List <string> savePathList, string lightmapScene)
            {
                if (assetBundleData.IsIgnoreExtension(filePath))
                {
                    return(true);
                }

                Object assetObject = AssetDatabase.LoadMainAssetAtPath(URL.assets + "/" + filePath);

                if (assetObject == null)
                {
                    Debug.LogError("Read asset file fail:" + filePath);
                    return(false);
                }

                assetObjectList.Add(assetObject);
                assetObjectNameList.Add(filePath);
                savePathList.Add(filePath + ".unity3d");

                if (!GetBuildLightmapParams(assetBundleData, filePath, assetObjectList, assetObjectNameList, savePathList, lightmapScene))
                {
                    return(false);
                }

                return(true);
            }
            private bool GetBuildSceneParams(AssetBundleData assetBundleData, string filePath, List <Object> assetObjectList, List <string> assetObjectNameList, List <string> savePathList)
            {
                if (assetBundleData.IsIgnoreExtension(filePath))
                {
                    return(true);
                }

                assetObjectList.Add(null);
                assetObjectNameList.Add(filePath);
                savePathList.Add(filePath + ".unity3d");
                return(true);
            }
            private bool GetBuildDirectoryParams(AssetBundleData assetBundleData, string dirPath, List <Object> assetObjectList, List <string> assetObjectNameList, List <string> savePathList)
            {
                if (assetBundleData.IsIgnoreExtension(dirPath))
                {
                    return(true);
                }

                // files
                string[] fileFullPathList = Directory.GetFiles(URL.dataPath + "/" + dirPath);
                if (fileFullPathList != null && fileFullPathList.Length != 0)
                {
                    foreach (string fileFullPath in fileFullPathList)
                    {
                        string filePath = fileFullPath.Replace('\\', '/').Substring(URL.dataPath.Length + 1);
                        if (!GetBuildFileParams(assetBundleData, filePath, assetObjectList, assetObjectNameList, savePathList, null))
                        {
                            return(false);
                        }
                    }
                }

                // sub directory
                if (recursive)
                {
                    string[] subDirFullPathList = Directory.GetDirectories(URL.dataPath + "/" + dirPath);
                    if (subDirFullPathList != null && subDirFullPathList.Length != 0)
                    {
                        foreach (string subDirFullPath in subDirFullPathList)
                        {
                            string subDirPath = subDirFullPath.Replace('\\', '/').Substring(URL.dataPath.Length + 1);
                            if (!GetBuildDirectoryParams(assetBundleData, subDirPath, assetObjectList, assetObjectNameList, savePathList))
                            {
                                return(false);
                            }
                        }
                    }
                }

                return(true);
            }
            private bool GetBuildSceneParams(AssetBundleData assetBundleData, string filePath, List<Object> assetObjectList, List<string> assetObjectNameList, List<string> savePathList)
            {
                if (assetBundleData.IsIgnoreExtension(filePath))
                {
                    return true;
                }

                assetObjectList.Add(null);
                assetObjectNameList.Add(filePath);
                savePathList.Add(filePath + ".unity3d");
                return true;
            }
            private bool GetBuildFileParams(AssetBundleData assetBundleData, string filePath, List<Object> assetObjectList, List<string> assetObjectNameList, List<string> savePathList, string lightmapScene)
            {
                if (assetBundleData.IsIgnoreExtension(filePath))
                {
                    return true;
                }

                Object assetObject = AssetDatabase.LoadMainAssetAtPath(URL.assets + "/" + filePath);
                if (assetObject == null)
                {
                    Debug.LogError("Read asset file fail:" + filePath);
                    return false;
                }

                assetObjectList.Add(assetObject);
                assetObjectNameList.Add(filePath);
                savePathList.Add(filePath + ".unity3d");

                if (!GetBuildLightmapParams(assetBundleData, filePath, assetObjectList, assetObjectNameList, savePathList, lightmapScene))
                {
                    return false;
                }

                return true;
            }
            private bool GetBuildDirectoryParams(AssetBundleData assetBundleData, string dirPath, List<Object> assetObjectList, List<string> assetObjectNameList, List<string> savePathList)
            {
                if (assetBundleData.IsIgnoreExtension(dirPath))
                {
                    return true;
                }

                // files
                string[] fileFullPathList = Directory.GetFiles(URL.dataPath + "/" + dirPath);
                if (fileFullPathList != null && fileFullPathList.Length != 0)
                {
                    foreach (string fileFullPath in fileFullPathList)
                    {
                        string filePath = fileFullPath.Replace('\\', '/').Substring(URL.dataPath.Length + 1);
                        if (!GetBuildFileParams(assetBundleData, filePath, assetObjectList, assetObjectNameList, savePathList, null))
                        {
                            return false;
                        }
                    }
                }

                // sub directory
                if (recursive)
                {
                    string[] subDirFullPathList = Directory.GetDirectories(URL.dataPath + "/" + dirPath);
                    if (subDirFullPathList != null && subDirFullPathList.Length != 0)
                    {
                        foreach (string subDirFullPath in subDirFullPathList)
                        {
                            string subDirPath = subDirFullPath.Replace('\\', '/').Substring(URL.dataPath.Length + 1);
                            if (!GetBuildDirectoryParams(assetBundleData, subDirPath, assetObjectList, assetObjectNameList, savePathList))
                            {
                                return false;
                            }
                        }
                    }
                }

                return true;
            }