Skip to content
This repository was archived by the owner on May 9, 2025. It is now read-only.

Commit 88b507e

Browse files
Fixed issue where constant value would be drawn with a label
1 parent 5e3173f commit 88b507e

3 files changed

Lines changed: 26 additions & 5 deletions

File tree

Assets/NewBehaviourScript.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ public class NewBehaviourScript : MonoBehaviour
3838
//[SerializeField]
3939
//private SByteReference sByteReference;
4040

41-
[SerializeField]
42-
private SceneReference sceneReference;
41+
//[SerializeField]
42+
//private SceneReference sceneReference;
4343

4444
//[SerializeField]
4545
//private ShortReference shortReference;

Assets/SO Architecture/Editor/Drawers/GenericPropertyDrawer.cs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@ public static void DrawPropertyDrawerNew(Rect rect, SerializedProperty property,
1414
{
1515
if(SOArchitecture_EditorUtility.HasPropertyDrawer(type))
1616
{
17-
EditorGUI.PropertyField(rect, property);
17+
if(drawLabel)
18+
{
19+
EditorGUI.PropertyField(rect, property);
20+
}
21+
else
22+
{
23+
EditorGUI.PropertyField(rect, property, GUIContent.none);
24+
}
1825
}
1926
else
2027
{
@@ -27,7 +34,14 @@ public static void DrawPropertyDrawerLayoutNew(SerializedProperty property, Type
2734
{
2835
if (SOArchitecture_EditorUtility.HasPropertyDrawer(type))
2936
{
30-
EditorGUILayout.PropertyField(property);
37+
if (drawLabel)
38+
{
39+
EditorGUILayout.PropertyField(property);
40+
}
41+
else
42+
{
43+
EditorGUILayout.PropertyField(property, GUIContent.none);
44+
}
3145
}
3246
else
3347
{

Assets/SO Architecture/Editor/Generic Property Drawer/BasePropertyDrawIterator.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,14 @@ public virtual void Draw()
2727

2828
if (IsCustom(iterator))
2929
{
30-
DrawPropertyWithLabel();
30+
if (drawLabel)
31+
{
32+
DrawPropertyWithLabel();
33+
}
34+
else
35+
{
36+
DrawProperty();
37+
}
3138
}
3239
else
3340
{

0 commit comments

Comments
 (0)