Code Monkey home page Code Monkey logo

bindingsrx's People

Contributors

grofit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bindingsrx's Issues

Is a description mistake At "Binding Overview"?

var myReactiveProperty = new ReactiveProperty("hello");
var myInputField = GetComponent();
myInputField.BindTextTo(myReactiveProperty)
.AddTo(myReactiveProperty);

Is that the last myReactiveProperty fact myInputField?

BindChildPrefabsTo() destroys transform instead of gameobject

GameObjectExtensions.BindChildPrefabsTo() should destroy instantiated prefabs during element removal from ReactiveCollection.
But GameObjectExtensions.onElementRemoved() destorys transform of instantiated prefab instead of gameobject.
This is not working if instance has RectTransfom.
There are 2 cases:

  1. RectTransfom destoryed and replaced with Transform.
  2. RectTransform not destroyed because there is another component depending on it.

In both cases actual gameobject not destroyed.

I suggest replcaing impelmentation of GameObjectExtensions.onElementRemoved() to:

void onElementRemoved(CollectionRemoveEvent<T> data)
{
    var existingChild = input.transform.GetChild(data.Index).gameObject;
    onChildRemoving?.Invoke(data.Value, existingChild);
    GameObject.Destroy(existingChild);
}

Mono Compiler issue with Generics in unity 5.4 (or less)

Unity 5.4 has an issue within the mono compiler where it does not correctly find the right generic signatures within unirx.

Explicit unity 5.4 build download

There is specifically a build [here] (https://github.com/grofit/bindingsrx/releases/0.3.1) that explicitly sets the generics required, however in unity 5.5 and above this issue has been fixed.

Fixing it yourself (VS + R# or Rider)

If you wish to fix this issue yourself it is SUPER easy if you have resharper, as all you need to do is go to the problematic lines (unity will tell you where they are, generally all Select statements) and just press alt + enter to infer generic usage, this will solve the problem for you.

Fixing it yourself (Non R#)

If you do not use resharper or rider then all you need to do is go through GenericBindings.cs and there will be a few .Select(Converter.From) calls, and you just need to change these to .Select<T1,T2>(Converter.From) (or depending on if its To/From in the call it may be T2 first then T1), there are a few other issues unity will point out, but in most cases you can manually infer the generic and the problem will go away.


As mentioned the above build contains this fix, but new versions will only support unity 5.5 out the box, this is because the additional code changes are superfluous when the unity bug is fixed, also it is painful trying to keep 2 versions of unity installed and run with, so given the fixes are quite easy and there is a build to use to assist this should help those with u5.4 issues. Although if anyone wants to maintain it feel free to make a branch which is kept in-line with master but is for 5.4 releases or whatever.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.