Skip to content

Commit 27ca3c5

Browse files
authored
Update README.md
1 parent 50914da commit 27ca3c5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ This is handy to make sure something doesn't get unassigned by accident. You can
1212

1313
Fields with unassigned references many times only have one reference you could possibly assign to it; a `GameManager` field probably wants to refer to the `GameManager` MonoBehaviour in the scene, and a `LocalizationsHandler` field probably wants to refer to the single `LocalizationsHandler` ScriptableObject in your assets. In these cases, the editor will show a "fill" button next to the field, which will automatically fill out the reference. If it could possibly refer to multiple things, like a Rigidbody reference, there won't be a fill button, since it can't be automatically filled.
1414

15+
For value types, the package comes with a `[NonEmpty]` attribute, which can be used to check that lists and strings aren't empty, colors aren't unassigned, enums aren't the default case, numbers aren't zero, and so on.
16+
1517
## Installation
1618

1719
You can drop the NonNullAttribute.cs into your Assets folder (but it does *not* go in the Editor folder), or you can install it via the Unity package manager (recommended!) by adding this line to your Packages/manifest.json file:

0 commit comments

Comments
 (0)