-
-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Summary
Develop a custom Inspector for TMP_Text
objects that allows users to apply rich text tags (e.g., <b>
, <i>
, <color>
) to selected portions of the text directly in the Unity Inspector. This eliminates the need to manually write rich text tags and improves workflow efficiency.
Motivation
Manually typing rich text tags can be error-prone and time-consuming, especially for large or complex text content. A visual tool that lets users select a portion of text and apply rich text formatting with a single click will streamline the process and reduce mistakes.
Deliverables
- A custom Inspector for
TMP_Text
objects with:- A visual text editing area.
- Rich text formatting options (bold, italic, color, size, etc.).
- Drag-and-drop or selection-based tag application.
- Support for previewing the formatted text in the Inspector.
Example Workflow
Workflow in Unity Editor
- Select a
TMP_Text
object in the scene. - In the custom Inspector:
- Highlight a portion of the text in a dedicated text editing area.
- Choose a formatting option (e.g., Bold, Italic, Color).
- The selected text is automatically wrapped with the appropriate rich text tags.
- Preview the formatted text directly in the Inspector.
Example UI in Inspector
- Text Area: Displays and allows selection of text.
- Formatting Buttons:
- B: Apply
<b>
for bold text. - I: Apply
<i>
for italic text. - Color Picker: Apply
<color>
with a chosen color. - Font Size: Apply
<size>
with a specified value.
- B: Apply
- Apply and Undo Options: Quickly preview or revert changes.
Priority
Medium: This feature will significantly enhance usability for developers working with richly formatted text, especially in large UI projects.
Notes
The custom Inspector should support all standard rich text tags supported by TextMeshPro and handle edge cases such as overlapping or nested tags. Future iterations could include support for RubyTextMeshPro and other custom extensions.
Metadata
Metadata
Assignees
Labels
Projects
Status