- Home /
[WebGL] Enabling Emission and setting an Emission Texture on an Asset Bundle Material breaks the material
Hello,
currently trying to port a application i made before to WebGL to get familiar with the platform. I have since dissected the project in a bunch of asset bundles to reduce load time and all that stuff. Now I am stuck at a problem:
The project is trying to highlight certain aspects of an object via an emission map, when interacted with the object. As such I am trying to set an emission map and emission color at runtime, which works fine on a non-Asset-Bundle asset, but completely breaks the material on an Asset-Bundle asset. The inspector does show the right properties though and dragging the material to a simple non-asset-bundle-plane will show the highlights.
Does anyone know a solution to fix this problem?
Alternatively I tried having an object with the material and the proper script in the scene and then setting its material to the Asset-Bundle-object when instantiated... This does not completly break the material, but instead it shows correctly on the object that was in the scene from the start and on the asset-bundle-object it is simply not showing the emission... Anyone know what that is or a workaround for the problem?
Greetings Ken
Your answer
![](https://koobas.hobune.stream/wayback/20220613003111im_/https://answers.unity.com/themes/thub/images/avi.jpg)