UnityEditor.ProceduralMaterialInspector.HasProceduralTextureProperties C# (CSharp) Method

HasProceduralTextureProperties() public method

public HasProceduralTextureProperties ( Material material ) : bool
material UnityEngine.Material
return bool
        public bool HasProceduralTextureProperties(Material material)
        {
            Shader s = material.shader;
            int propertyCount = ShaderUtil.GetPropertyCount(s);
            for (int i = 0; i < propertyCount; i++)
            {
                if (ShaderUtil.GetPropertyType(s, i) == ShaderUtil.ShaderPropertyType.TexEnv)
                {
                    string propertyName = ShaderUtil.GetPropertyName(s, i);
                    Texture tex = material.GetTexture(propertyName);
                    if (SubstanceImporter.IsProceduralTextureSlot(material, tex, propertyName))
                    {
                        return true;
                    }
                }
            }
            return false;
        }