Skip to content

Commit b10d3d6

Browse files
committed
Added TwoWayBinding with state
1 parent 1c75ab6 commit b10d3d6

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Runtime/Scripts/BindingExtensions.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ public static IDisposable BindTwoWayValueChanged<T>(this INotifyValueChanged<T>
117117
var d2 = BindToValueChanged(element, property);
118118
return StableCompositeDisposable.Create(d1, d2);
119119
}
120+
public static IDisposable BindTwoWayValueChangedWithState<T>(this INotifyValueChanged<T> element, IReactiveProperty<T> property, bool stateIsProperty = true)
121+
{
122+
var d1 = BindValueChangedWithState(element, property, stateIsProperty);
123+
var d2 = BindToValueChangedWithState(element, property, stateIsProperty);
124+
return StableCompositeDisposable.Create(d1, d2);
125+
}
120126
#endregion
121127
}
122128
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"displayName": "Red Moon Reactive Kit",
88
"name": "io.crazyjackel.redmoon-reactivekit",
99
"unity": "2020.3",
10-
"version": "1.0.1",
10+
"version": "1.0.2",
1111
"dependencies": {
1212
"com.unity.ui": "1.0.0-preview.18"
1313
},

0 commit comments

Comments
 (0)