-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The namespaces were getting a bit hap hazard for adding new ones so removed categories and put them all in one namespace.
- Loading branch information
Showing
39 changed files
with
70 additions
and
79 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
4 changes: 1 addition & 3 deletions
4
.../BindingsRx/UI/CanvasElementExtensions.cs → ...ngsRx/Bindings/CanvasElementExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
6 changes: 1 addition & 5 deletions
6
...ssets/BindingsRx/UI/DropdownExtensions.cs → ...BindingsRx/Bindings/DropdownExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
3 changes: 1 addition & 2 deletions
3
...ngsRx/GameObjects/GameObjectExtensions.cs → ...ndingsRx/Bindings/GameObjectExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
3 changes: 1 addition & 2 deletions
3
...ets/BindingsRx/UI/InputFieldExtensions.cs → ...ndingsRx/Bindings/InputFieldExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System; | ||
using BindingsRx.Filters; | ||
using UniRx; | ||
using UnityEngine; | ||
|
||
namespace BindingsRx.Bindings | ||
{ | ||
/// <summary> | ||
/// All material bindings require explicit cleanup as Material is not IDisposable | ||
/// </summary> | ||
public static class MaterialExtensions | ||
{ | ||
public static IDisposable BindColorTo(this Material input, IReactiveProperty<Color> property, BindingTypes bindingType = BindingTypes.Default, params IFilter<Color>[] filters) | ||
{ return GenericBindings.Bind(() => input.color, x => input.color = x, property, bindingType, filters); } | ||
|
||
public static IDisposable BindColorTo(this Material input, Func<Color> getter, Action<Color> setter, BindingTypes bindingType = BindingTypes.Default, params IFilter<Color>[] filters) | ||
{ return GenericBindings.Bind(() => input.color, x => input.color = x, getter, setter, bindingType, filters); } | ||
|
||
public static IDisposable BindTextureTo(this Material input, IReactiveProperty<Texture> property, BindingTypes bindingType = BindingTypes.Default, params IFilter<Texture>[] filters) | ||
{ return GenericBindings.Bind(() => input.mainTexture, x => input.mainTexture = x, property, bindingType, filters); } | ||
|
||
public static IDisposable BindColorTo(this Material input, Func<Texture> getter, Action<Texture> setter, BindingTypes bindingType = BindingTypes.Default, params IFilter<Texture>[] filters) | ||
{ return GenericBindings.Bind(() => input.mainTexture, x => input.mainTexture = x, getter, setter, bindingType, filters); } | ||
|
||
public static IDisposable BindShaderTo(this Material input, IReactiveProperty<Shader> property, BindingTypes bindingType = BindingTypes.Default, params IFilter<Shader>[] filters) | ||
{ return GenericBindings.Bind(() => input.shader, x => input.shader = x, property, bindingType, filters); } | ||
|
||
public static IDisposable BindShaderTo(this Material input, Func<Shader> getter, Action<Shader> setter, BindingTypes bindingType = BindingTypes.Default, params IFilter<Shader>[] filters) | ||
{ return GenericBindings.Bind(() => input.shader, x => input.shader = x, getter, setter, bindingType, filters); } | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
3 changes: 1 addition & 2 deletions
3
...Rx/GameObjects/MonobehaviourExtensions.cs → ...ngsRx/Bindings/MonoBehaviourExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
4 changes: 1 addition & 3 deletions
4
...Rx/GameObjects/RectTransformExtensions.cs → ...ngsRx/Bindings/RectTransformExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
3 changes: 1 addition & 2 deletions
3
...sets/BindingsRx/UI/ScrollBarExtensions.cs → ...indingsRx/Bindings/ScrollBarExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
3 changes: 1 addition & 2 deletions
3
...ets/BindingsRx/UI/ScrollRectExtensions.cs → ...ndingsRx/Bindings/ScrollRectExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
4 changes: 1 addition & 3 deletions
4
src/Assets/BindingsRx/UI/SliderExtensions.cs → ...s/BindingsRx/Bindings/SliderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
3 changes: 1 addition & 2 deletions
3
src/Assets/BindingsRx/UI/TextExtensions.cs → ...ets/BindingsRx/Bindings/TextExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
3 changes: 1 addition & 2 deletions
3
src/Assets/BindingsRx/UI/ToggleExtensions.cs → ...s/BindingsRx/Bindings/ToggleExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
4 changes: 1 addition & 3 deletions
4
...ingsRx/GameObjects/TransformExtensions.cs → ...indingsRx/Bindings/TransformExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
using BindingsRx; | ||
using BindingsRx.Generic; | ||
using BindingsRx.Bindings; | ||
using NUnit.Framework; | ||
using UniRx; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
using BindingsRx.UI; | ||
using BindingsRx.Bindings; | ||
using UniRx; | ||
using UnityEngine; | ||
using UnityEngine.UI; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
using BindingsRx.UI; | ||
using BindingsRx.Bindings; | ||
using UnityEngine; | ||
using UnityEngine.UI; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters