private void DoShaderVariants(EditorWindow caller, ref Rect drawPos) { EditorGUI.BeginChangeCheck(); bool usedBySceneOnly = GUI.Toggle(drawPos, ShaderInspectorPlatformsPopup.currentVariantStripping == 1, EditorGUIUtility.TempContent("Skip unused shader_features"), ShaderInspectorPlatformsPopup.Styles.menuItem); drawPos.y += 16f; if (EditorGUI.EndChangeCheck()) { ShaderInspectorPlatformsPopup.currentVariantStripping = !usedBySceneOnly ? 0 : 1; } drawPos.y += 6f; int comboCount = ShaderUtil.GetComboCount(this.m_Shader, usedBySceneOnly); string text = !usedBySceneOnly?comboCount.ToString() + " variants total" : comboCount.ToString() + " variants included"; Rect position = drawPos; position.x += (float)ShaderInspectorPlatformsPopup.Styles.menuItem.padding.left; position.width -= (float)(ShaderInspectorPlatformsPopup.Styles.menuItem.padding.left + 4); GUI.Label(position, text); position.xMin = position.xMax - 40f; if (!GUI.Button(position, "Show", EditorStyles.miniButton)) { return; } ShaderUtil.OpenShaderCombinations(this.m_Shader, usedBySceneOnly); caller.Close(); GUIUtility.ExitGUI(); }