Esempio n. 1
0
 public TextureSetMaterialData(ConfigNode node)
 {
     shader         = node.GetStringValue("shader");
     meshNames      = node.GetStringValues("mesh");
     excludedMeshes = node.GetStringValues("excludeMesh");
     props          = ShaderProperty.parse(node);
 }
Esempio n. 2
0
        public string getPropertyValue(string name)
        {
            ShaderProperty prop = Array.Find(props, m => m.name == name);

            if (prop == null)
            {
                return(string.Empty);
            }
            if (prop is ShaderPropertyTexture)
            {
                return(((ShaderPropertyTexture)prop).textureName);
            }
            if (prop is ShaderPropertyFloat)
            {
                return(((ShaderPropertyFloat)prop).val.ToString());
            }
            if (prop is ShaderPropertyColor)
            {
                return(((ShaderPropertyColor)prop).color.ToString());
            }
            return(string.Empty);
        }