Skip to content

Commit

Permalink
chore: removed unneded files in ABs (#140)
Browse files Browse the repository at this point in the history
This PR removes unneded files in the AB output

Co-authored-by: Mariano Goldman <[email protected]>
  • Loading branch information
davidejensen and marianogoldman authored Aug 30, 2024
1 parent 3f06539 commit 6e46e0d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
13 changes: 9 additions & 4 deletions asset-bundle-converter/Assets/AssetBundleConverter/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ public static bool IsCompressedFormat(TextureFormat format)

public static class Utils
{
private const string LOG_FILENAME = "buildlogtep.json";

public static void PrintDiskSize(string step)
{
var defaultDrive = DriveInfo.GetDrives()
Expand Down Expand Up @@ -226,8 +228,8 @@ public static void PrintDiskSize(string step)
Debug.Log("Size Step: No Drive available");
}
}


[Serializable]
private class PointersData
{
Expand Down Expand Up @@ -282,8 +284,8 @@ internal static bool ParseOptionExplicit(string[] rawArgsList, string optionName

return true;
}



internal static void Exit(int errorCode = 0)
{
Expand Down Expand Up @@ -474,6 +476,9 @@ public static List<AssetPath> GetPathsFromPairs(string basePath, IReadOnlyList<M

public static void CleanAssetBundleFolder(IFile file, string pathToSearch, string[] assetBundlesList, Dictionary<string, string> lowerToUpperDictionary)
{
//Deletes log file as it is unnecessary for the AB, can be done here only because it's auto generated by the scriptable build pipeline
file.Delete(pathToSearch + LOG_FILENAME);

for (int i = 0; i < assetBundlesList.Length; i++)
{
string assetBundleName = assetBundlesList[i];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ public IAssetBundleManifest BuildAssetBundles(string outputPath, BuildAssetBundl

var buildInput = ContentBuildInterface.GenerateAssetBundleBuilds();

//Filter out the DCL asset bundles, as they are not needed for the build.
List<AssetBundleBuild> buildInputList = new List<AssetBundleBuild>(buildInput);
buildInputList.RemoveAll(item => item.assetBundleName.StartsWith("dcl/"));
buildInput = buildInputList.ToArray();

// Address by names instead of paths for backwards compatibility.
for (var i = 0; i < buildInput.Length; i++)
buildInput[i].addressableNames = buildInput[i].assetNames.Select(Path.GetFileName).ToArray();
Expand Down

0 comments on commit 6e46e0d

Please sign in to comment.