1.8.0: Added AssetsOnly, SceneObjectsOnly, AssignAssetIfNull, AssignComponentIfNull
- Attributes: Added AssetsOnly, SceneObjectsOnly, AssignAssetIfNull, AssignComponentIfNull - Attributes: Replaced AssignIfNull with AssignComponentIfNull
This commit is contained in:
parent
070b82767f
commit
eb19150d98
23 changed files with 302 additions and 73 deletions
|
|
@ -1,5 +1,4 @@
|
|||
using System.Reflection;
|
||||
using Module.Inspector.Editor.Utilities;
|
||||
using Module.Inspector.Editor.Utilities;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
|
|
@ -21,25 +20,20 @@ namespace Module.Inspector.Editor
|
|||
if (!IsValidTarget())
|
||||
return;
|
||||
|
||||
FieldInfo[] fields = EditorHiddenFieldUtility.Query(target);
|
||||
EditorHiddenFieldUtility.EditableFieldInfo[] fields = EditorHiddenFieldUtility.Query(target);
|
||||
|
||||
if (fields.Length == 0)
|
||||
return;
|
||||
|
||||
float totalHeight = EditorHiddenFieldUtility.CalculateHeight(fields) + EditorGUIUtility.singleLineHeight * 2;
|
||||
GUILayout.Space(totalHeight);
|
||||
|
||||
var position = new Rect(0, 0, 1, 1);
|
||||
|
||||
if (Event.current.type == EventType.Repaint)
|
||||
{
|
||||
position = GUILayoutUtility.GetLastRect();
|
||||
position.y -= totalHeight;
|
||||
|
||||
#if UNITY_2020_1_OR_NEWER
|
||||
position.width = EditorGUIUtility.currentViewWidth - 22.0f;
|
||||
#endif
|
||||
}
|
||||
Rect position = GUILayoutUtility.GetLastRect();
|
||||
position.y -= totalHeight;
|
||||
|
||||
#if UNITY_2020_1_OR_NEWER
|
||||
position.width = EditorGUIUtility.currentViewWidth - 22.0f;
|
||||
#endif
|
||||
|
||||
position.y = position.yMax + EditorGUIUtility.singleLineHeight;
|
||||
position.height = EditorGUIUtility.singleLineHeight;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue