-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Please restrict asmdef files to only the platforms they actually support.
My game targets Android, iOS, WebGL, and Windows. Google Ads is supported on Android/iOS only. When building WebGL (and similarly Windows), the project fails because some asmdefs compile on all platforms while their dependencies compile only on Android/iOS.
Problem
Example:
GoogleMobileAds.Mediation.IronSource.Api.asmdef— currently supports all platforms and references
GoogleMobileAds.Mediation.IronSource.Mediation.asmdef.GoogleMobileAds.Mediation.IronSource.Mediation.asmdef— limited to"Editor","Android","iOS".
When building for WebGL, the Api assembly is compiled, but the Mediation assembly is not, which results in missing types/references and the build fails. To ship a WebGL build I currently have to remove these packages from the project.
Steps to Reproduce
- Open a Unity project that includes the IronSource mediation for Google Mobile Ads.
- Set Build Target to WebGL.
- Build the project.
- Observe compile errors about missing classes referenced from
GoogleMobileAds.Mediation.IronSource.Mediation.
Expected Behavior
WebGL/Windows builds succeed without manual package removal because mobile-only code is excluded.
Actual Behavior
Build fails due to missing references from mediation assemblies that aren’t compiled on WebGL/Windows.
Proposed Fix
Limit affected asmdefs to the platforms they support, e.g. set includePlatforms to Android and iOS for runtime/mobile-only assemblies (and split out any Editor code into a separate .Editor.asmdef if needed).
Minimal example change:
Alternatively, ensure the top-level API asmdef does not compile on platforms where its dependencies are excluded, or use an Editor-only asmdef for tooling code (includePlatforms: ["Editor"]).
Request
Please update the asmdef files to exclude unsupported platforms (at least WebGL and Windows) so non-mobile builds don’t fail. Thanks!