private void OnEnable() { MessageBroker.Default .Receive <ChooseSoldierWeaponCommand>() .Where(command => command.SoldierId == identificator.SoldierId) .Do(command => spawning.SetWeaponName(command.WeaponName)) .TakeUntilDisable(this) .Subscribe(); }
public void ChooseSelectedFirstWeapon() { var selectedFirstWeapon = firstWeaponDropdown.captionText.text; spawning.SetWeaponName(selectedFirstWeapon); }