Search Issue Tracker
In Progress
Under Consideration for 6000.0.X, 6000.1.X
In Progress in 6000.2.X
Votes
2
Found in
2022.3.63f1
6000.0.51f1
6000.1.7f1
6000.2.0b5
Issue ID
UUM-109242
Regression
Yes
[Asset Bundles] The Active Build Platform is being used instead of the build target to determine material/shader compilation
Reproduction steps:
1. Open the attached project
a) If testing on Windows, open the “IN-103987_Win” project
b) If testing on Mac, open the “IN-103987_OSX” project
2. While the Windows (or macOS, if testing on Mac) Build Profile is selected, navigate to Assets > Build Assetbundles. This will build a bundle targeting Windows (or macOS)
3. Open the “SampleScene” and Enter Play Mode
4. Observe the Game view and the “Expected result”
5. Switch the active Build Profile to Android
6. Manually delete the “Assets/StreamingAssets” folder
7. Navigate to Assets > Build Assetbundles
8. Enter Play Mode in the “SampleScene”
9. Observe the Game view and the “Actual result”
Expected result: Three shapes are rendered with the default material
Actual result: Three shapes are loaded but not rendered. In the hierarchy view the meshes can be observed as instantiated, but the Materials are invisible
Reproducible with: 2022.3.45f1, 2022.3.63f1, 6000.0.51f1, 6000.1.7f1, 6000.2.0b5
Not reproducible with: 2022.1.0a5, 2022.3.44f1
Reproducible environments: Windows 10 (by reporter), macOS 15.5
Not reproducible environments: No other environments tested
Notes:
- this report was sent by request for the problem discussed here: [https://discussions.unity.com/t/assetbundles-containing-materials-do-not-build-correctly-for-other-platforms/1645556|https://discussions.unity.com/t/assetbundles-containing-materials-do-not-build-correctly-for-other-platforms/1645556]
- It appears that the active platform is being used to determine material/shader compilation rather than the build target
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Editor Launch Screen will close when Enter is pressed on it
- ObjectPool's pool is destroyed when entering Play Mode without reloading Domain
- [Android] Permission window is not shown when using a Build App Bundle (Google Play) with Minify set to Release
- NullReferenceException errors appear in the Console and Inspector window turns black when dragging .cs and .uxml files to another directory
- Crash when reimporting fbx asset used as tree by specific Terrain component
Add comment