Skip to content

Commit 29325aa

Browse files
committed
Updated package files
1 parent 5f4e60f commit 29325aa

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

CHANGELOG.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11
# Changelog
22

3+
## [3.0.0] - 2020-08-02
4+
### Added
5+
- Pooling of Constrained Rect
6+
37
## [2.1.0] - 2020-06-07
4-
## Added
8+
### Added
59
- Options to center horizontally and vertically
610

711
## [2.0.2] - 2020-02-19
8-
## Fixed
12+
### Fixed
913
- Incorrect naming of assembly definitions
1014

1115
## [2.0.1] - 2020-02-19
12-
## Fixed
16+
### Fixed
1317
- Tests assembly references
1418

1519
## [2.0.0] - 2020-02-17
16-
## Added
20+
### Added
1721
- Tests
1822

19-
## Changed
23+
### Changed
2024
- Calculation method for left, top, right, bottom
2125
- Width and height no longer override right and bottom by default
2226

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ private void Foo()
5959
}
6060
```
6161

62+
### Important
63+
Due to the nature of Unity's editor architecture it is common to use Constrained Rects in high volume. In an attempt to prevent creating and collecting too much garbage as a result of using Constrained Rects they are now being pooled.
64+
65+
After you've finalized your Constrained Rect by calling `.ToRect()` the Constrained Rect will be returned to the pool and free to use for other instances.
66+
67+
While all of this happens under the hood it is important to understand that from the moment that you call `.ToRect()` the Constrained Rect will throw an exception if it is not being used. This also means that if it is being used then the properties and variables might be different from what you might expect.
68+
69+
6270
## Contributing
6371
Pull requests are welcomed. Please feel free to fix any issues you find, or add new features.
6472

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "net.tnrd.constrainedrect",
3-
"version": "2.1.0",
3+
"version": "3.0.0",
44
"displayName": "Constrained Rect",
55
"description": "A simple helper to constrain a Rect to an EditorWindow or another Rect",
66
"unity": "2019.1",

0 commit comments

Comments
 (0)