public Task DamageAsync(double amount) { async UniTask SetHealthTask() { await UniTask.SwitchToMainThread(); DamageTool.damagePlayer(new DamagePlayerParameters { player = Player, times = 1, damage = (float)amount }, out _); } return(SetHealthTask().AsTask()); }