- Home /
Shader does have property, but material.HasProperty() returns: false
I have a shader made in shaderlab. This shader has the property "_wobbleSpeed" but "Exposed" is turned off. When I execute the function: 'if(m_material.HasProperty("_wobbleSpeed"))', Unity returns false even though it does have the property. When I turn on Exposed in shaderlab, Unity does find the property but all default values are messed up. Is there any way I can check whether the property exists but keep Exposed off? When I turn on exposed, all hundreds of objects get terrible default values and mess up the complete game.
Comment