/// <summary> /// Displays the preferences for a feature. /// </summary> /// <param name="featureLabel">Feature label.</param> private void DisplayPreferences(GUIContent featureLabel) { m_ScrollPosition = EditorGUILayout.BeginScrollView(m_ScrollPosition); { foreach (MethodInfo method in s_MenuItems[featureLabel.text]) { EditorGUILayout.LabelField( method.DeclaringType.IsGenericType ? string.Format( "{0} ({1})", method.DeclaringType.Name.ToWords().Range(0, -2), ", ".Join(from t in method.DeclaringType.GetGenericArguments() select t.Name.ToWords()) ) : method.DeclaringType.Name.ToWords(), EditorStyles.boldLabel ); EditorGUIX.DisplayHorizontalLine(); EditorGUI.indentLevel += 1; method.Invoke(null, null); EditorGUI.indentLevel -= 1; } } EditorGUILayout.EndScrollView(); // bug report button DisplayBugReportButton(featureLabel); // forum link button if ( s_SupportForumUrls.ContainsKey(featureLabel.text) && !string.IsNullOrEmpty(s_SupportForumUrls[featureLabel.text]) && EditorGUIX.DisplayButton(string.Format("Get Help with {0}", featureLabel.text)) ) { OpenUrl(s_SupportForumUrls[featureLabel.text]); } // asset store page if ( s_AssetStoreUrls.ContainsKey(featureLabel.text) && !string.IsNullOrEmpty(s_AssetStoreUrls[featureLabel.text]) && EditorGUIX.DisplayButton(string.Format("Review {0} on the Unity Asset Store", featureLabel.text)) ) { OpenUrl(s_AssetStoreUrls[featureLabel.text]); } // products page if (EditorGUIX.DisplayButton("More Products by Candlelight Interactive")) { OpenUrl(s_PublisherPage); } }