Build Asset Bundles BEFORE Building Standalone?

Hello every1!,

I think this is pretty standard around the community,

How are you guys automatically building your asset bundles right before you Build the standalone player? is there a way or any callback to check that?

I’ve found OnPostprocessBuild to check right after the standalone build has been made, so i can do stuff like deleting the “resources.assets” file from the build, is this a good practice or could it implement problems on the actual standalone? (i need to use ma resources “inEditor” then i just wanted to delete them from the actual build.)

Thank u!

Regarding #1 - we have our own code for building asset bundles. For us, the process does not only build the asset bundles, but run through some processing before actually building the assets into bundles.

This process can be executed from a menu item. It then copies the needed asset bundles under StreamingAssets. So, before running a build, we execute this (manually).

When building in Unity cloud build, this process is hooked as a pre-export, so it gets triggered automatically.