This topic has come up a few times, but - from within the Editor, how do I, without manually switching the platform, build my Addressables and Bundles for all platforms I care about? This is NOT a player build, this is a separate content editing project.
EditorUserBuildSettings.SwitchActiveBuildTargetAsync doesn’t let me switch reliably, sometimes it gets picky about Standalone platforms, sometimes about non-standalone platforms. (what is the special about BuildTargetGroup.Standalone, anyway).
I tried to invoke it in Batchmode from the command line, but no Addressables are built and nothing appears in /ServerData.
The compilation error was something in FmodUnity (kind of disturbing - why do addressables care, at all, about IL2CPP)
Anyway, next problem: This is the platform switch problem I keep getting - what’s going on? Is this two wrong parameters? It happens when switching from BuildTargetGroup.IOS, BuildTarget.IOS to BuildTargetGroup. Android,BuildTarget.Android.
EDIT: Maybe I’m just too dumb to organize my queues…
My workaround is to strictly decide what the group is based on the next target. The old (obsolete) API actually did this. I guess the domain reloads are also awful, time to serialize the queue somehow…
Yeah I was thinking about this - it does scale pretty okay with UnityAccelerator for now. We can split this up later if needed. Only with a fresh library folder and no accelerator support you’re hit by the full brunt of the import work times the number of platforms - usually only happens on an Editor Version Upgrade.
Turns out, at least in Unity 2021, the Library can contain AssetDatabases for multiple BuildTargets. (not sure when that changed) Keep your Library folders, folks!
So, since the Library is usually kept, and because this is run exclusively manually, this feels right to me right now. And running it on a server would basically be the same action - navigate somewhere and click - but with much higher complexity and putting load on our already strained build machines.
This approach clearly beats building the content individually, checking out multiple projects, with someone possibly (I dare say… usually!!!) forgetting one, etc.
We also always need at least 2 (realistically 4) BuildTargets to be perfectly in sync, so they coexist in [BuildTarget] subfolders of ServerData. We also want to be able to quickly build one of these without committing to PlasticSCM first (this is for the “Latest” badge on our Devel cloud bucket).
I am a beginner in Unity who is still in the internship period, I need to build to Windows, iOS and Android.
I was wondering if you could post the command line example(if it is necessary) and complete C# codes here?
Do I need to create a new Object in the Editor folder to mount the C# Script?
I have spent 3 days on this problem but no good progress yet.