Is there currently any way to create (from within editor tool) MaterialInstanceConstant and set various static switches at it to true/false ?
I see methods to get switches names, but no methods to set’em.
It’s possible at all without modifying engine ?
I want to create tool that will automatically go thru all my (selected) materials, create all possible combinations (in terms of static switches) from then, the save them in content browser, put some template meshes on the scene, and assign those material instances to them, to compose level.
Couse I’m using level streaming on android and there is an noticable chickup each time new shader comes in (it’s need to be compiled, and it takes a lot of time. So my idea is to create (it possible automatically) level that will have all shader
permutations that possibly can exist in the level. And this level will be streamed as first one to precache all shaders.
Or there is a better way to do this ? (there is about 100 - 200 permutations in whole game, as I count this, so doing this by hand is a LOT of clicking, and as the shader artist will add new material (shader), it also need to be added to this ‘precache level’
all this is very error prone … so I’m looking for some automated solution.