From 165aa10d2864f2235587255330928a6e4b1f3908 Mon Sep 17 00:00:00 2001 From: Juan Ignacio Molteni Date: Fri, 1 Nov 2024 12:42:35 -0300 Subject: [PATCH 1/2] chore: asset bundle compression (#173) --- Dockerfile | 4 ++-- .../AssetBundleConverter.cs | 17 +++++++++-------- .../LODsConverter/Scripts/LODConversion.cs | 10 ++++------ 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index db82a81d..65186677 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,8 +52,8 @@ ENV PATH=$NVM_DIR/versions/node/$NODE_VERSION/bin:$PATH # Change this value ONLY if we have done breaking changes for every material, doing so is VERY costly ENV AB_VERSION=v13 -ENV AB_VERSION_WINDOWS=v28 -ENV AB_VERSION_MAC=v28 +ENV AB_VERSION_WINDOWS=v29 +ENV AB_VERSION_MAC=v29 # NODE_ENV is used to configure some runtime options, like JSON logger ENV NODE_ENV=production diff --git a/asset-bundle-converter/Assets/AssetBundleConverter/AssetBundleConverter.cs b/asset-bundle-converter/Assets/AssetBundleConverter/AssetBundleConverter.cs index 7b269a93..55fddf9e 100644 --- a/asset-bundle-converter/Assets/AssetBundleConverter/AssetBundleConverter.cs +++ b/asset-bundle-converter/Assets/AssetBundleConverter/AssetBundleConverter.cs @@ -1,16 +1,15 @@ -using AssetBundleConverter; -using AssetBundleConverter.Editor; -using AssetBundleConverter.Wrappers.Implementations.Default; -using AssetBundleConverter.Wrappers.Interfaces; -using GLTFast; -using System; +using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Text.RegularExpressions; using System.Threading.Tasks; +using AssetBundleConverter; +using AssetBundleConverter.Editor; +using AssetBundleConverter.Wrappers.Interfaces; using Cysharp.Threading.Tasks; +using GLTFast; using UnityEditor; using UnityEditor.Animations; using UnityEngine; @@ -953,7 +952,8 @@ public virtual bool BuildAssetBundles(BuildTarget target, out IAssetBundleManife // 1. Convert flagged folders to asset bundles only to automatically get dependencies for the metadata manifest = env.buildPipeline.BuildAssetBundles(settings.finalAssetBundlePath, - BuildAssetBundleOptions.UncompressedAssetBundle | BuildAssetBundleOptions.ForceRebuildAssetBundle | BuildAssetBundleOptions.AssetBundleStripUnityVersion, + BuildAssetBundleOptions.ChunkBasedCompression | BuildAssetBundleOptions.ForceRebuildAssetBundle | + BuildAssetBundleOptions.AssetBundleStripUnityVersion, target); if (manifest == null) @@ -978,7 +978,8 @@ public virtual bool BuildAssetBundles(BuildTarget target, out IAssetBundleManife // 3. Convert flagged folders to asset bundles again but this time they have the metadata file inside manifest = env.buildPipeline.BuildAssetBundles(settings.finalAssetBundlePath, - BuildAssetBundleOptions.UncompressedAssetBundle | BuildAssetBundleOptions.ForceRebuildAssetBundle | BuildAssetBundleOptions.AssetBundleStripUnityVersion, + BuildAssetBundleOptions.ChunkBasedCompression | BuildAssetBundleOptions.ForceRebuildAssetBundle | + BuildAssetBundleOptions.AssetBundleStripUnityVersion, target); var afterSecondBuild = EditorApplication.timeSinceStartup; diff --git a/asset-bundle-converter/Assets/AssetBundleConverter/LODsConverter/Scripts/LODConversion.cs b/asset-bundle-converter/Assets/AssetBundleConverter/LODsConverter/Scripts/LODConversion.cs index fa45ba44..49ddfdc1 100644 --- a/asset-bundle-converter/Assets/AssetBundleConverter/LODsConverter/Scripts/LODConversion.cs +++ b/asset-bundle-converter/Assets/AssetBundleConverter/LODsConverter/Scripts/LODConversion.cs @@ -1,18 +1,14 @@ using System; -using System.Collections; using System.Collections.Generic; using System.IO; -using System.Linq; using System.Threading.Tasks; using AssetBundleConverter.LODsConverter.Utils; -using AssetBundleConverter.Wrappers.Interfaces; using DCL; using DCL.ABConverter; using UnityEditor; using UnityEngine; using UnityEngine.Rendering; using Object = UnityEngine.Object; -using SystemWrappers = AssetBundleConverter.Wrappers.Implementations.Default.SystemWrappers; public class LODConversion { @@ -218,7 +214,8 @@ public void BuildAssetBundles(BuildTarget target) // 1. Convert flagged folders to asset bundles only to automatically get dependencies for the metadata var manifest = buildPipeline.BuildAssetBundles(lodPathHandler.outputPath, - BuildAssetBundleOptions.UncompressedAssetBundle | BuildAssetBundleOptions.ForceRebuildAssetBundle | BuildAssetBundleOptions.AssetBundleStripUnityVersion, + BuildAssetBundleOptions.ChunkBasedCompression | BuildAssetBundleOptions.ForceRebuildAssetBundle | + BuildAssetBundleOptions.AssetBundleStripUnityVersion, target); if (manifest == null) @@ -245,7 +242,8 @@ public void BuildAssetBundles(BuildTarget target) // 3. Convert flagged folders to asset bundles again but this time they have the metadata file inside buildPipeline.BuildAssetBundles(lodPathHandler.outputPath, - BuildAssetBundleOptions.UncompressedAssetBundle | BuildAssetBundleOptions.ForceRebuildAssetBundle | BuildAssetBundleOptions.AssetBundleStripUnityVersion, + BuildAssetBundleOptions.ChunkBasedCompression | BuildAssetBundleOptions.ForceRebuildAssetBundle | + BuildAssetBundleOptions.AssetBundleStripUnityVersion, target); } From 45f4d94116f0289af3963d3d13b9e94c132b3448 Mon Sep 17 00:00:00 2001 From: Alejo Thomas Ortega Date: Mon, 4 Nov 2024 18:06:19 -0300 Subject: [PATCH 2/2] feat: add staging environment on manual-deploy workflow (#174) --- .github/workflows/manual-deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/manual-deploy.yml b/.github/workflows/manual-deploy.yml index ce6f25c4..b46dc061 100644 --- a/.github/workflows/manual-deploy.yml +++ b/.github/workflows/manual-deploy.yml @@ -8,6 +8,7 @@ on: type: choice options: - dev + - stg - prd default: prd description: Environment