internal override void ResetValues()
{
base.ResetValues();
this.propertyNames = new List <string>();
this.displayNames = new List <string>();
this.textures = new List <Texture>();
this.dimensions = new List <TextureDimension>();
ShaderImporter shaderImporter = this.target as ShaderImporter;
if (shaderImporter == null)
{
return;
}
Shader shader = shaderImporter.GetShader();
if (shader == null)
{
return;
}
int propertyCount = ShaderUtil.GetPropertyCount(shader);
for (int i = 0; i < propertyCount; i++)
{
if (ShaderUtil.GetPropertyType(shader, i) == ShaderUtil.ShaderPropertyType.TexEnv)
{
string propertyName = ShaderUtil.GetPropertyName(shader, i);
string propertyDescription = ShaderUtil.GetPropertyDescription(shader, i);
Texture defaultTexture = shaderImporter.GetDefaultTexture(propertyName);
this.propertyNames.Add(propertyName);
this.displayNames.Add(propertyDescription);
this.textures.Add(defaultTexture);
this.dimensions.Add(ShaderUtil.GetTexDim(shader, i));
}
}
}