File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- using OC . VisualElements ;
2- using UnityEditor ;
1+ using UnityEditor ;
32using UnityEditor . UIElements ;
43using UnityEngine . UIElements ;
54
@@ -17,10 +16,10 @@ public override VisualElement CreateInspectorGUI()
1716
1817 var groupControl = new PropertyGroup ( "Control" ) ;
1918 groupControl . Add ( new ObjectField ( "Actor" ) { bindingPath = "_actor" , objectType = typeof ( Components . Actor ) } . AlignedField ( ) ) ;
20- groupControl . Add ( new FloatField ( "Target" ) { isReadOnly = false } . BindProperty ( component . Target ) . AlignedField ( ) ) ;
19+ groupControl . Add ( new FloatField ( "Target" ) { bindingPath = "_target._value" } . AlignedField ( ) ) ;
2120
2221 var groupStatus = new PropertyGroup ( "Status" ) ;
23- groupStatus . Add ( new FloatField ( "Value" ) { isReadOnly = true } . BindProperty ( component . Value ) . AlignedField ( ) ) ;
22+ groupStatus . Add ( new FloatField ( "Value" ) { isReadOnly = true , bindingPath = "_value._value" } . AlignedField ( ) ) ;
2423
2524 var groupSettings = new PropertyGroup ( "Settings" ) ;
2625 groupSettings . Add ( new FloatField ( "Factor" ) { bindingPath = "_factor" } . AlignedField ( ) ) ;
Original file line number Diff line number Diff line change 1- using OC . VisualElements ;
21using OC . Interactions . UIElements ;
32using UnityEditor ;
43using UnityEditor . UIElements ;
@@ -18,8 +17,8 @@ public override VisualElement CreateInspectorGUI()
1817 var container = new VisualElement ( ) ;
1918
2019 var groupStatus = new PropertyGroup ( "Status" ) ;
21- groupStatus . Add ( new LampField ( "Pressed" , Color . green ) . BindProperty ( component . Pressed ) . AlignedField ( ) ) ;
22- groupStatus . Add ( new LampField ( "Feedback" , Color . green ) . BindProperty ( component . Feedback ) . AlignedField ( ) ) ;
20+ groupStatus . Add ( new LampField ( "Pressed" , Color . green ) { bindingPath = "_pressed._value" } . AlignedField ( ) ) ;
21+ groupStatus . Add ( new LampField ( "Feedback" , Color . green ) { bindingPath = "_feedback._value" } . AlignedField ( ) ) ;
2322
2423 var groupSettings = new PropertyGroup ( "Settings" ) ;
2524 groupSettings . Add ( new Toggle ( "Local Feedback" ) { bindingPath = "_localFeedback" } . AlignedField ( ) ) ;
Original file line number Diff line number Diff line change @@ -18,13 +18,13 @@ public override VisualElement CreateInspectorGUI()
1818 var groupControl = new PropertyGroup ( "Control" ) ;
1919 groupControl . AddOverride ( serializedObject ) ;
2020 var hStack = new StackHorizontal ( ) ;
21- hStack . Add ( new PushButton ( "Minus" ) . BindProperty ( component . Minus ) ) ;
22- hStack . Add ( new PushButton ( "Plus" ) . BindProperty ( component . Plus ) ) ;
21+ hStack . Add ( new PushButton ( "Minus" ) { bindingPath = "_minus._value" } ) ;
22+ hStack . Add ( new PushButton ( "Plus" ) { bindingPath = "_plus._value" } ) ;
2323 groupControl . Add ( hStack ) ;
2424
2525 var groupStatus = new PropertyGroup ( "Status" ) ;
2626 groupStatus . Add ( new ProgressBar ( "Progress" ) { bindingPath = "_progress._value" , ShowLimits = true } ) ;
27- groupStatus . Add ( new FloatField ( "Value" ) { isReadOnly = true } . BindProperty ( component . Value ) . AlignedField ( ) ) ;
27+ groupStatus . Add ( new FloatField ( "Value" ) { isReadOnly = true , bindingPath = "_value._value" } . AlignedField ( ) ) ;
2828
2929 var groupSettings = new PropertyGroup ( "Settings" ) ;
3030 groupSettings . Add ( new Vector2Field ( "Limits" ) { bindingPath = "_limits._value" } . AlignedField ( ) ) ;
Original file line number Diff line number Diff line change 1- using OC . VisualElements ;
21using UnityEditor ;
32using UnityEditor . UIElements ;
43using UnityEngine ;
@@ -18,11 +17,11 @@ public override VisualElement CreateInspectorGUI()
1817
1918 var groupControl = new PropertyGroup ( "Control" ) ;
2019 groupControl . AddOverride ( serializedObject ) ;
21- groupControl . Add ( new FloatField ( "Target" ) . BindProperty ( component . Target ) . AlignedField ( ) ) ;
20+ groupControl . Add ( new FloatField ( "Target" ) { bindingPath = "_target._value" } . AlignedField ( ) ) ;
2221
2322 var groupStatus = new PropertyGroup ( "Status" ) ;
24- groupStatus . Add ( new LampField ( "Is Active" , Color . green ) . BindProperty ( component . IsActive ) . AlignedField ( ) ) ;
25- groupStatus . Add ( new FloatField ( "Value" ) { isReadOnly = true } . BindProperty ( component . Value ) . AlignedField ( ) ) ;
23+ groupStatus . Add ( new LampField ( "Is Active" , Color . green ) { bindingPath = "_stateObserver._isActive._value" } . AlignedField ( ) ) ;
24+ groupStatus . Add ( new FloatField ( "Value" ) { isReadOnly = true , bindingPath = "_value._value" } . AlignedField ( ) ) ;
2625
2726 var groupSettings = new PropertyGroup ( "Settings" ) ;
2827 groupSettings . Add ( new FloatField ( "Speed" ) { bindingPath = "_speed._value" } . AlignedField ( ) ) ;
Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ public override VisualElement CreateInspectorGUI()
2424 groupControl . Add ( hStack ) ;
2525
2626 var groupStatus = new PropertyGroup ( "Status" ) ;
27- groupStatus . Add ( new LampField ( "Is Active" , Color . green ) . BindProperty ( component . IsActive ) . AlignedField ( ) ) ;
28- groupStatus . Add ( new FloatField ( "Value" ) { isReadOnly = true } . BindProperty ( component . Value ) . AlignedField ( ) ) ;
27+ groupStatus . Add ( new LampField ( "Is Active" , Color . green ) { bindingPath = "_stateObserver._isActive._value" } . AlignedField ( ) ) ;
28+ groupStatus . Add ( new FloatField ( "Value" ) { isReadOnly = true , bindingPath = "_value._value" } . AlignedField ( ) ) ;
2929
3030 var groupSettings = new PropertyGroup ( "Settings" ) ;
3131 groupSettings . Add ( new FloatField ( "Speed" ) { bindingPath = "_speed._value" } . AlignedField ( ) ) ;
Original file line number Diff line number Diff line change 1- using OC . VisualElements ;
21using UnityEditor ;
32using UnityEditor . UIElements ;
43using UnityEngine ;
@@ -18,11 +17,11 @@ public override VisualElement CreateInspectorGUI()
1817
1918 var groupControl = new PropertyGroup ( "Control" ) ;
2019 groupControl . AddOverride ( serializedObject ) ;
21- groupControl . Add ( new FloatField ( "Target" ) . BindProperty ( component . Target ) . AlignedField ( ) ) ;
20+ groupControl . Add ( new FloatField ( "Target" ) { bindingPath = "_target._value" } . AlignedField ( ) ) ;
2221
2322 var groupStatus = new PropertyGroup ( "Status" ) ;
24- groupStatus . Add ( new LampField ( "Is Active" , Color . green ) . BindProperty ( component . IsActive ) . AlignedField ( ) ) ;
25- groupStatus . Add ( new FloatField ( "Value" ) { isReadOnly = true } . BindProperty ( component . Value ) . AlignedField ( ) ) ;
23+ groupStatus . Add ( new LampField ( "Is Active" , Color . green ) { bindingPath = "_stateObserver._isActive._value" } . AlignedField ( ) ) ;
24+ groupStatus . Add ( new FloatField ( "Value" ) { isReadOnly = true , bindingPath = "_value._value" } . AlignedField ( ) ) ;
2625
2726 var groupSettings = new PropertyGroup ( "Settings" ) ;
2827 groupSettings . Add ( new FloatField ( "Acceleration" ) { bindingPath = "_acceleration._value" } . AlignedField ( ) ) ;
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public override VisualElement CreateInspectorGUI()
1818
1919 var groupControl = new PropertyGroup ( "Control" ) ;
2020 groupControl . AddOverride ( serializedObject ) ;
21- groupControl . Add ( new ToggleButton ( "Lock" ) . BindProperty ( component . LockSignal ) ) ;
21+ groupControl . Add ( new ToggleButton ( "Lock" ) { bindingPath = "_lockSignal._value" } ) ;
2222
2323 var groupStatus = new PropertyGroup ( "Status" ) ;
2424 groupStatus . Add ( new LampField ( "Lock" , Color . green ) . BindProperty ( component . LockSignal ) . AlignedField ( ) ) ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public override VisualElement CreateInspectorGUI()
1919
2020 var groupControl = new PropertyGroup ( "Control" ) ;
2121 groupControl . AddOverride ( serializedObject ) ;
22- groupControl . Add ( new ToggleButton ( "Collision" ) . BindProperty ( component . State ) . AlignedField ( ) ) ;
22+ groupControl . Add ( new ToggleButton ( "Collision" ) { bindingPath = "_state._value" } . AlignedField ( ) ) ;
2323
2424 var groupStatus = new PropertyGroup ( "Status" ) ;
2525 groupStatus . Add ( new LampField ( "Collision" , Color . yellow ) . BindProperty ( component . Collision ) . AlignedField ( ) ) ;
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public override VisualElement CreateInspectorGUI()
1818
1919 var groupControl = new PropertyGroup ( "Control" ) ;
2020 groupControl . AddOverride ( serializedObject ) ;
21- groupControl . Add ( new ToggleButton ( "Signal" ) . BindProperty ( component . Signal ) . AlignedField ( ) ) ;
21+ groupControl . Add ( new ToggleButton ( "Signal" ) { bindingPath = "_signal._value" } . AlignedField ( ) ) ;
2222
2323 var groupStatus = new PropertyGroup ( "Status" ) ;
2424 groupStatus . Add ( new LampField ( "Value" , Color . green ) . BindProperty ( component . Value ) . AlignedField ( ) ) ;
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public override VisualElement CreateInspectorGUI()
1818
1919 var groupControl = new PropertyGroup ( "Control" ) ;
2020 groupControl . AddOverride ( serializedObject ) ;
21- groupControl . Add ( new UnsignedLongField ( "Value" ) . BindProperty ( component . Value ) . AlignedField ( ) ) ;
21+ groupControl . Add ( new UnsignedLongField ( "Value" ) { bindingPath = "_value._value" } . AlignedField ( ) ) ;
2222
2323 var groupStatus = new PropertyGroup ( "Status" ) ;
2424 groupStatus . Add ( new LampField ( "Collision" , Color . yellow ) . BindProperty ( component . Collision ) . AlignedField ( ) ) ;
You can’t perform that action at this time.
0 commit comments