Skip to content

Commit 08a9757

Browse files
committed
Updates coordinate system documentation
Clarifies that Rects are now returned in the text object's local space. Highlights breaking changes from versions prior to 0.6.0.
1 parent 6447cda commit 08a9757

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ Retrieve the **Rect information** for specific strings rendered by a `TMP_Text`
123123
- **Returns**:
124124
- A list of `TextRectInfo` containing `Rects` and the `TargetString`.
125125

126+
> [!IMPORTANT]
127+
> **Coordinate System**
128+
> The returned `Rect` values are in the **local space of the text object's transform**.
129+
>
130+
> **Breaking Change Notice**: In versions prior to `0.6.0`, the `Rect` for `TextMeshProUGUI` was returned in the Canvas's local space. This has been changed to consistently use the text object's local space for all `TMP_Text` types. Please update your implementation accordingly.
131+
126132
##### Code Example
127133
```csharp
128134
using Runtime.Helper;
@@ -172,6 +178,13 @@ Attempt to retrieve the **Rect information** for specific strings rendered by a
172178
- **Returns**:
173179
- `bool`: `true` if successful.
174180

181+
> [!IMPORTANT]
182+
> **Coordinate System**
183+
> The returned `Rect` values are in the **local space of the text object's transform**.
184+
>
185+
> **Breaking Change Notice**: In versions prior to `0.6.0`, the `Rect` for `TextMeshProUGUI` was returned in the Canvas's local space. This has been changed to consistently use the text object's local space for all `TMP_Text` types. Please update your implementation accordingly.
186+
187+
175188
##### Code Example
176189
```csharp
177190
List<TextRectInfo> results;

0 commit comments

Comments
 (0)