1.8.2: Fixed a couple of more issues with certain using EditorGUI.PropertyField, and removed label element from SerializeReferenceTo when used in an array
This commit is contained in:
parent
b189ec8b97
commit
61c7356b3a
5 changed files with 15 additions and 10 deletions
|
|
@ -28,7 +28,7 @@ namespace Module.Inspector.Editor
|
|||
else
|
||||
{
|
||||
// Note: Why not use EditorGUI.PropertyField?
|
||||
// The reason is that the foldout uses Toggle and ObjectField and if if we don't use
|
||||
// The reason is that the foldout uses Toggle and ObjectField and if we don't use
|
||||
// Label and ObjectField here, then ObjectField will be given a new control id when changing
|
||||
// objectReferenceValue from an existing object to null and back again. The new object will
|
||||
// not be set, due to null giving a new control id.
|
||||
|
|
@ -102,7 +102,6 @@ namespace Module.Inspector.Editor
|
|||
|
||||
EditorGUI.indentLevel++;
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
{
|
||||
bool prevEnabled = GUI.enabled;
|
||||
GUI.enabled = prevEnabled && editable;
|
||||
|
|
@ -116,7 +115,6 @@ namespace Module.Inspector.Editor
|
|||
|
||||
GUI.enabled = prevEnabled;
|
||||
}
|
||||
|
||||
bool hasChanged = EditorGUI.EndChangeCheck();
|
||||
EditorGUI.indentLevel--;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue