Precompile Shaders to switch Materials at Runtime

Hello Community,

i’m currently developing a small mobile game. My Character is a Ball which can Morph between two Materials. The transition and applying works perfectly fine. The idea is that there a whole lot different Textures the player can choose from, 1 for state A and 1 for state B. The Materials are stored as variables.

However if I didn’t apply the Material sometime , before running the game, the Material is not compiled and the standard grey placeholder texture is used.

So my workaround is applying and unapply each material to the ball one time. This seems to work but doesn’t look like a robust solution. Also I’m unsure what happens if I run the game on a different machine.