Skip to content

Commit bc37fd3

Browse files
committed
fix: OnGUI drawers not supporting prefab overrides
1 parent 1c237df commit bc37fd3

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
# 2.1.0 - Unreleased
2+
3+
### Added
4+
5+
- `TryGetNewValue` and `TryGetOldValue` methods for `CollectionChangedArgs<KeyValuePair<TKey, TValue>>`
6+
- `OnPreStart`, `OnPreDisabled`, and `OnDisabled` lifetime methods to `RuntimeScriptableObject`
7+
- (Generator) The ability to set custom callback names for generated methods using the `CallbackName` property on the generate attributes
8+
9+
### Changed
10+
11+
- `OnExitPlayMode` is now obsolete. Use `OnDisabled` instead.
12+
13+
### Fixed
14+
15+
- No error is thrown when trying to use a read-only list as a destination list in `ConvertAll`, `FindAll`, `GetRange`, and `Slice` methods
16+
- Some properties not being marked as ReadOnly when generating property bags
17+
- Scriptable value drawers not supporting prefab overrides in IMGUI mode
18+
- (Generator) Fields marked with generate attributes and starting with "on" generating duplicate "On" prefix in generated methods
19+
- (Generator) Duplicate subscribed callbacks mask names when inheriting from a base class with generated callbacks
20+
121
# 2.0.0 - 2025-05-08
222

323
### Added

Packages/se.hertzole.scriptable-values/Editor/Drawers/BaseScriptableDrawer.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,16 @@ public abstract class BaseScriptableDrawer : PropertyDrawer
2727

2828
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
2929
{
30+
label = EditorGUI.BeginProperty(position, label, property);
31+
3032
EditorGUI.BeginChangeCheck();
3133
Object obj = EditorGUI.ObjectField(position, label, property.objectReferenceValue, fieldInfo.FieldType, true);
3234
if (EditorGUI.EndChangeCheck())
3335
{
3436
property.objectReferenceValue = obj;
3537
}
38+
39+
EditorGUI.EndProperty();
3640
}
3741

3842
public override VisualElement CreatePropertyGUI(SerializedProperty property)

0 commit comments

Comments
 (0)