Is there a (convenient) way to create a new material for a TMP UI element, using a TMP Surface element’s material as a base? I’ve tried creating a new material with a (hard-coded) reference to the desired UI shader, then using Material.CopyPropertiesFromMaterial, but this mostly resulted in a ton of errors in the log about certain properties not existing in either material.
Does manually copying over the right properties even work? Or is that actually not the way to go with TMP Materials and presets?
I know about this, but I’m looking at creating these new materials at runtime through code.
I used a workaround instead, turns out the standard TMP Materials work well enough both in UI as well as in world elements, making a “material conversion” unnecessary.
Side question, is it intentional that Surface TMP shaders aren’t supported in URP? All other shaders seem to work fine, but Surface TMP materials result in lovely magenta squares.