public static void text2Inspector(UIText2 aToggle) { if(aToggle.debug == true) { GUI.enabled = false; EditorGUILayout.ObjectField("Text Component", aToggle.guiText, typeof(GUIText), true); EditorGUILayout.ObjectField("Debug Bounds", aToggle.guiTexture, typeof(GUITexture), true); GUI.enabled = true; } aToggle.text = EditorGUILayout.TextField("Text", aToggle.text); aToggle.font = (Font)EditorGUILayout.ObjectField("Font", aToggle.font, typeof(Font), true); aToggle.fontSize = EditorGUILayout.IntField("Font Size", aToggle.fontSize); aToggle.fontStyle = (FontStyle)EditorGUILayout.EnumPopup("Font Style", aToggle.fontStyle); aToggle.fontColor = EditorGUILayout.ColorField("Font Color", aToggle.fontColor); }
public static UIText2 text2Field(string aContent, UIText2 aToggle) { return (UIText2)EditorGUILayout.ObjectField(aContent, aToggle, typeof(UIText2), true); }