• Stars
    star
    120
  • Rank 295,983 (Top 6 %)
  • Language
    C#
  • License
    MIT License
  • Created over 7 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A 2 way binding system for unity using unirx

BindingsRx

BindingsRx is a one or two way binding system for unity using unirx.

Discord

It allows you to write more succinct code while showing intent for properties which are bound to other properties, and looks something like this:

myInputField.BindTextTo(someReactiveProperty);
// Changing myInputField.text will update someReactiveProperty and vice versa

Dependencies

Features

  • Supports one and two way binding
  • Helpers for creating your own custom bindings
  • Works with ReactiveProperty<T> and regular values
  • Supports custom processing on binding via IFilter interface
  • Simplifies complex UI interactions, such as binding dropdown options

As mentioned it works with the unirx ReactiveProperty<T> but does not need them, so for example if I had a reactive property I could do:

var myReactiveProperty = new ReactiveProperty<float>(1.0f);
mySlider.BindValueTo(myReactiveProperty);

However if I was working with a 3rd party library I may not have ReactiveProperty objects, so for that I would do:

var myNormalValue = 1.0f;
mySlider.BindValueTo(() => myNormalValue, x => myNormalValue = x);

You can also specify if you want one way or two way bindings explicitly.

var myReactiveProperty = new ReactiveProperty<float>(1.0f);
mySlider.BindValueTo(myReactiveProperty, BindingTypes.OneWay);

Here is an example of making a dropdown in the UI bind to a reactive collection:

var exampleOptions = new ReactiveCollection<string>();
exampleOptions.Add("Option 1");
exampleOptions.Add("Option 2");
exampleOptions.Add("Some Other Option");

someDropdownUIElement.BindOptionsTo(exampleOptions);

Installation

You can take the unitypackage installation file from the relevent release.

Quick Start

  • Install the above package
  • Install UniRx

Running Examples

If you want to run the examples then just clone it and open the unity project in the src folder, then run the examples, I will try to add to as the library matures.

There are also a suite of tests which are being expanded as the project grows.

Docs

See the docs folder for more information. (This will grow)

Other Blurbs

If you like design patterns and practices then there is also a ECS framework built on unirx which can be found @ grofit/ecsrx.

More Repositories

1

aurelia-chart

A chart element for aurelia which is powered by chart js using html5 canvas.
JavaScript
46
star
2

persistity

A persistence framework for game developers
C#
37
star
3

knockout.chart

A knockout binding to allow chart.js and knockout to work together for the greater good.
JavaScript
25
star
4

knockout.merge

Adds basic merging functionality into knockout js mapping namespace
JavaScript
16
star
5

aurelia-files

A simple attribute plugin for Aurelia to simplify loading files with the HTML5 FileReader
JavaScript
15
star
6

development-for-winners

Hopefully useful information for people who want to develop apps, websites, games using modern day approaches and tools.
15
star
7

knockout.files

Knockout binding for reading files via the FileReader
HTML
15
star
8

LazyData

A data transform library for taking any model and converting it to an output format
C#
14
star
9

dotween-nodecanvas

Node Canvas actions for DoTween library
C#
12
star
10

uframe-nodecanvas

Allows uFrame variables to co-exist with nodeCanvas variables
C#
9
star
11

aurelia-generate

Automagically generate templates/markup based upon your view model schema
JavaScript
5
star
12

playmaker-astar-actions

Playmaker Astar Pathfinding Actions
C#
5
star
13

knockout.tab

A simple binding for knockout to provide tabbed behaviours
HTML
4
star
14

knockout.gravatar

Knockout binding to turn images into gravatars
JavaScript
4
star
15

knockout.collapse

Adds collapsible behaviour with knockout bindings
JavaScript
4
star
16

eventjs

A simple event object for javascript to allow subscription and publish events with predicates
JavaScript
3
star
17

tag-system-example

An example tag system for procedural stuff
C#
3
star
18

knockout.cropper

A knockout binding for the jquery cropper library
HTML
3
star
19

knockout.watermark

A knockout binding for using jquery watermark
JavaScript
3
star
20

knockout.markdown

Knockout bindings for markdown-it
HTML
3
star
21

unity-rx-test

A repo to check what problems rx.net 4.x and unity 2018.x have when building for IL2CPP
C#
3
star
22

aurelia-gravatar

A simple custom element to allow you to use gravatar profile images with little hassle
JavaScript
2
star
23

docker-clamav-windows

A ClamAV image for windows containers
Dockerfile
2
star
24

knockout.typing

A knockout binding for handling if a user is typing something into an element
JavaScript
2
star
25

aurelia-skeleton-navigation-ts

A simple example of swapping out babel and ES6 for TSC and Typescript with the aurelia skeleton-navigation project
JavaScript
2
star
26

uFrame.ECS.Actions.AStarPathfinding

uFrame ECS actions for Aron Granberg's A* Pathfinding
C#
2
star
27

battle-kill-9000

The repo for the code stream I decided to do
C#
2
star
28

knockout.tree

A bare bones binding to get jstree working with knockout
CSS
2
star
29

uFrame.MVVM.NodeCanvasPlugin

A plugin for uFrame which will automatically generate NC actions for get/set/check/execute ViewModel properties/commands.
C#
2
star
30

ecsrx.schmup

A simple schmup with ecsrx
C#
1
star
31

aurelia-typing

A custom attribute plugin to simplify notifications when users are typing
JavaScript
1
star
32

uFrame.ECS.Actions.FinalIK

uFrame ECS actions for Final IK
C#
1
star
33

knockout.date

A simple date format binding for knockout, using date.js
JavaScript
1
star
34

script-template-loader

A webpack template loader for systems like knockout which takes html and throws it into a script template, and optionally into the DOM
JavaScript
1
star
35

Ambient

A tool for pnp music and sound management
C#
1
star
36

knockout.textcomplete

A knockout binding for jquery-textcomplete
HTML
1
star
37

Glue

A VERY lightweight dependency manager for Javascript
JavaScript
1
star
38

knockout.lock

A knockout binding for locking child elements
JavaScript
1
star
39

knockout.tooltip

A knockout binding for using qtip to produce tooltips for elements
JavaScript
1
star
40

Ambient-v2

A better designed version of the original Ambient project, however the UI is not finished
C#
1
star
41

dependi

A simple IoC container to achieve constructor injection in Javascript
JavaScript
1
star
42

aurelia-textcomplete

An aurelia plugin to wrap up interactions with jquery-textcomplete
JavaScript
1
star
43

Infinity

A .net port of the infinity engine
C#
1
star
44

SkypeRoller

A simple skype plugin for dice rolling, written in .net
C#
1
star
45

EcsRx-Reactor-Performance

Quick performance comparison
C#
1
star
46

uFrame.ECS.Actions.Rewired

uFrame ECS actions for Rewired
C#
1
star
47

knockout.ajaxTemplateEngine

A bare bones external template engine riding on top of the native knockout template engine
JavaScript
1
star
48

uFrame.ECS.Actions.DoTween

uFrame ECS actions for DoTween
C#
1
star