Skip to content

Commit e81f222

Browse files
author
Mohammad Alali
committed
Update 1.0.2 - Fix ReadOnlyWhenFound
Fix ReadOnlyWhenFound. It previously disabled the property field regardless of whether the property had been found or not. In this fix, it checks for the property's value and disables the field accordingly.
1 parent cd01190 commit e81f222

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CHANGELOG.md

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

3+
## [1.0.2] - 2023-12-10
4+
5+
### Fixed
6+
- Fixed ReadOnlyWhenFound
7+
8+
### Updated
9+
- Package Display Name
10+
311
## [1.0.1] - 2020-10-17
412

513
### Added

Editor/AutoHookPropertyDrawer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten
4141
}
4242
}
4343

44-
EditorGUI.BeginDisabledGroup(autoHookAttribute.ReadOnlyWhenFound);
44+
EditorGUI.BeginDisabledGroup(autoHookAttribute.ReadOnlyWhenFound && property.objectReferenceValue != null);
4545
EditorGUI.PropertyField(position, property, label);
4646
EditorGUI.EndDisabledGroup();
4747
}

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.autohook",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"displayName": "Auto Hook",
55
"description": "A property drawer that auto assigns a reference",
66
"unity": "2019.1",

0 commit comments

Comments
 (0)