public void OnInspectorGUI(Action onValueChanged)
{
// anisoLevel
using (new GUILayout.HorizontalScope()) {
GUILayout.Label("Aniso Level");
var changedVal = (int)EditorGUILayout.Slider(this.anisoLevel, 0, 16);// actually, max is not defined.
if (changedVal != this.anisoLevel) {
this.anisoLevel = changedVal;
onValueChanged();
}
}
// filterMode
var newFilterMode = (UnityEngine.FilterMode)EditorGUILayout.Popup("Filter Mode", (int)this.filterMode, Enum.GetNames(typeof(UnityEngine.FilterMode)), new GUILayoutOption[0]);
if (newFilterMode != this.filterMode) {
this.filterMode = newFilterMode;
onValueChanged();
}
// mipMapBias
var newMipMapBias = EditorGUILayout.TextField("MipMap Bias", this.mipMapBias.ToString());
if (newMipMapBias != this.mipMapBias.ToString()) {
this.mipMapBias = float.Parse(newMipMapBias, CultureInfo.InvariantCulture.NumberFormat);
onValueChanged();
}
// wrapMode
var newWrapMode = (UnityEngine.TextureWrapMode)EditorGUILayout.Popup("Wrap Mode", (int)this.wrapMode, Enum.GetNames(typeof(UnityEngine.TextureWrapMode)), new GUILayoutOption[0]);
if (newWrapMode != this.wrapMode) {
this.wrapMode = newWrapMode;
onValueChanged();
}
}