Skip to content

Commit cbc9de6

Browse files
committed
Update examples
1 parent bbc2596 commit cbc9de6

3 files changed

Lines changed: 24 additions & 5 deletions

File tree

Assets/Examples/Scenes/SampleScene.unity

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,16 +1149,23 @@ MonoBehaviour:
11491149
var1: 25.4
11501150
var2: {fileID: 977748988}
11511151
var3: 0
1152-
var4:
1153-
- var1: 36
1154-
- var1: 52
11551152
sampleField:
11561153
var1: {fileID: 0}
11571154
var2: 266
11581155
var3:
11591156
var1: 0
11601157
var2: New Label from var2.var3
1161-
sampleFields: []
1158+
sampleFields:
1159+
- var1: {fileID: 0}
1160+
var2: 274
1161+
var3:
1162+
var1: 0
1163+
var2:
1164+
- var1: {fileID: 0}
1165+
var2: 277
1166+
var3:
1167+
var1: 0
1168+
var2:
11621169
--- !u!4 &1583836799
11631170
Transform:
11641171
m_ObjectHideFlags: 2
@@ -1257,6 +1264,8 @@ MonoBehaviour:
12571264
var41: 00000000000000000000000000000000
12581265
var39: 0
12591266
var40: 2
1267+
var42: 0
1268+
var43: 0
12601269
--- !u!1 &1972418676
12611270
GameObject:
12621271
m_ObjectHideFlags: 0

Assets/Examples/Scripts/SampleBehaviour3.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,14 @@ private GameObject ObjectValue
5555

5656
[ShowWarningIf(nameof(var40), 3, "Value has to be greater than 3", Comparison = UnityComparisonMethod.LessEqual, DisableField = false)]
5757
public int var40;
58+
59+
[Label("Show Disabled If", skinStyle: SkinStyle.Box)]
60+
61+
[ShowDisabledIf(nameof(var40), 3, Comparison = UnityComparisonMethod.LessEqual)]
62+
public int var42;
63+
64+
[Label("Hide Disabled If", skinStyle: SkinStyle.Box)]
65+
66+
[HideDisabledIf(nameof(var40), 3, Comparison = UnityComparisonMethod.GreaterEqual)]
67+
public int var43;
5868
}

Assets/Examples/Scripts/SampleBehaviour7.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class SampleBehaviour7 : MonoBehaviour
2222

2323
[LabelByChild("var3.var2")]
2424
public SampleClass1 sampleField;
25-
[LabelByChild("var2"), ReorderableList]
25+
[LabelByChild("var2"), ReorderableList, Tooltip("Sample usage of the LabelByChildAttribute within a list")]
2626
public SampleClass1[] sampleFields;
2727

2828
[Serializable]

0 commit comments

Comments
 (0)