Assets from ".../Editor/Resources" being included in our builds. Why?

We’ve encountered a strange issue with old Editor assets suddenly started being included in our game builds.
Details:

  • All assets in the whole project that are in Resources folders that are nested under Editor folders are now being included in the base game build. These assets have not been touched (some for years), were not affected by the relevant commits, and according to Unity’s build rules should never be included. For example, the really big ones are the various reference screen shots for our internal test tools, which have not been changed (nor their metadata) since 2018.
  • These assets are not being referenced anywhere, are not assigned to asset bundles, are not being affected by asmdefs, etc. None of the usual means for getting assets into builds apply.
  • It started occurring with the update of Firebase to 6.16.1 (done via asset package instead of UPM, because of a bad interaction between Unity 2019.1.14, Firebase, and UPM). I have confirmed by checking the main branch builds builds before and after merging, checked the builds in the integration branch itself, and also rebuilding main branch from right before the integration to ensure it was not due to a concomitant change in our build pipeline, as well as removing Firebase entirely and rebuilding. I also did a local build on my machine, with the same result; the assets get included in the build.

Digging around, I cannot find any way to circumvent this Unity build rule, let alone how updating a 3rd party asset might do so. Is there some magic means by which magic folder rules get ignored that I have not accounted for? Does Firebase do something funky with the Unity build process?

1 Like

I was able to confirm that this is arising from Firebase (repro with new project in Unity 2019.1.14f, Firebase Crashlytics 6.16.1 added via asset package). Whatever is going on, it seems to be Firebase’s fault, although it may be exposing some issue in Unity. Regardless, I created a bug ticket with Firebase (Assets from ".../Editor/Resources" being included in our builds When Firebase Added to Project. Blows up build size. · Issue #876 · firebase/quickstart-unity · GitHub)