반응형
- 코드 작성
using System.Collections;
using System.Collections.Generic;
using UniRx;
using UnityEngine;
using UnityEngine.UI;
public class ButtonClickUniRX : MonoBehaviour
{
public Button button;
public Text text;
private void Start()
{
button.onClick
.AsObservable()
.Subscribe(_ =>
{
text.text = "Clicked";
});
}
}
참고할만한 글
반응형