[solved] Texture map Metallic is missing when importing from asset bundle

Hi there,

i’am on Unity 2019.3 and i have an fbx with albedo, normal and metallic map. It looks all fine if the fxb is imported and the maps reassigned correct.

But after building* an asset bundle from it, load the bundle, get the model from the bundle and Instantiate() it, the metallic map is gone.

What is the problem and how to fix it?

Related question, how to examine the complete content of the asset, including materials & textures? To see if its left to include on building.

Thanks

(*) BuildPipeline.BuildAssetBundles(path + "\\iOS", BuildAssetBundleOptions.StrictMode, BuildTarget.iOS);

The shader variant that uses the metallic map didn’t get compiled in. If it’s a standard Unity material, you need to add it to the “always included shaders” list in the project graphics settings.

Good point, but I only use standard shaders. And the only shader I’ve written myself is already in this list.

But the problem is solved by simply clearing the cache before creating the asset:
Caching.ClearCache();