Learning about UniRx and ran into a seemingly small problem that I can't seem to get my head around...

public Text testText;

public InputField A;
public InputField B;

private void Start() {
    Text BText = B.textComponent;
    Text AText = A.textComponent;

    AText.ObserveEveryValueChanged(t => t.text)
        .Select(t => int.Parse(t))
        .Select(i => i+1)
        .SubscribeToText(BText);

}

B's text component value won't ever change. If in place of BText I subscribe to testText, which is a separate Text object, its value will update accordingly.

I suppose I would need to call the String object of the Text component (B.text), but I don't know to do that with SubscribeToText which is what I'm supposed to be using.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.