// Use this for initialization void Start() { selectedGameObject.SubscribeToText(SelectedObjectText, go => go == null ? "No Object Selected" : go.name); selectedGameObject.SetValueAndForceNotify(null); TapStream().Subscribe(p => { RaycastHit hit; GameObject go = null; if (Physics.Raycast(Camera.main.ScreenPointToRay(p), out hit)) { go = hit.collider.gameObject; } selectedGameObject.Value = go; }); }
public void RaiseDamageEvent(DamageEvent damageEvent) { DamageStream.SetValueAndForceNotify(damageEvent); }