UnityEditor.MaterialEditor.TextureProperty C# (CSharp) Method

TextureProperty() public method

public TextureProperty ( MaterialProperty prop, string label ) : Texture
prop MaterialProperty
label string
return UnityEngine.Texture
        public Texture TextureProperty(MaterialProperty prop, string label)
        {
            bool scaleOffset = (prop.flags & MaterialProperty.PropFlags.NoScaleOffset) == MaterialProperty.PropFlags.None;
            return this.TextureProperty(prop, label, scaleOffset);
        }

Same methods

MaterialEditor::TextureProperty ( MaterialProperty prop, string label, bool scaleOffset ) : Texture
MaterialEditor::TextureProperty ( Rect position, MaterialProperty prop, string label ) : Texture
MaterialEditor::TextureProperty ( Rect position, MaterialProperty prop, string label, bool scaleOffset ) : Texture
MaterialEditor::TextureProperty ( Rect position, MaterialProperty prop, string label, string tooltip, bool scaleOffset ) : Texture
MaterialEditor::TextureProperty ( string propertyName, string label, ShaderUtil texDim ) : Texture
MaterialEditor::TextureProperty ( string propertyName, string label, ShaderUtil texDim, bool scaleOffset ) : Texture

Usage Example

 public void ShaderPropertiesGUI(Material material)
 {
     EditorGUI.BeginChangeCheck();
     {
         m_MaterialEditor.TextureProperty(mainTex, "Texture Main");
         m_MaterialEditor.TextureProperty(alphaTex, "Alpha");
     }
     if (EditorGUI.EndChangeCheck())
     {
         MaterialChanged(m_material);
     }
 }
All Usage Examples Of UnityEditor.MaterialEditor::TextureProperty
MaterialEditor