Last active
August 29, 2015 14:23
-
-
Save miyaoka/aa419249ec5d4cd94ce6 to your computer and use it in GitHub Desktop.
transform.childCount to ReactiveProperty
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
//子オブジェクト数の変更を監視 | |
var childCount = | |
transform | |
.ObserveEveryValueChanged (t => t.childCount) | |
.ToReactiveProperty (); | |
childCount | |
.Subscribe(c => hoge); | |
// transformに子オブジェクトが無い(transform.childCount == 0)状態で開始したとき | |
// UniRx4.8: OnNext発生する | |
// UniRx4.8.1: OnNext発生しない |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment