Button Disappears?

I have a pause button but whenever I run my code it works fine the first time but then it disappears.

Here is code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class PauseControllerScript : MonoBehaviour {

public string mainMenu;

public bool isPaused;

public GameObject pauseMenuCanvas;

public GameObject spawner;

public GameObject cups;

public GameObject button;

// Use this for initialization
void Start () {
	
}

// Update is called once per frame
public void Update () {
	if (isPaused) {
		pauseMenuCanvas.SetActive (true);
		Time.timeScale = 0f;
		spawner.GetComponent <BallSpawn> ().enabled = false;
	} else {
		pauseMenuCanvas.SetActive  (false);
		Time.timeScale = 1f;

	}
		

}

public void Resume () {

	isPaused = false;

}

public void Quit () {
	SceneManager.LoadScene ("StartScreen");

}

public void Yes () {
	isPaused = true;
	button.SetActive (false);
}

}

Well because you’re setting it to inactive in your Yes function and never setting it back to active.

You just need :

public void Resume () {
     button.SetActive(true);
     isPaused = false;
 }

first tell me what you wants to do in your project? why you put condition in update? what you wants to do?

if you make pause system then

public void ClickPause()
{
pausecanvas.setavtive(true);
}
public void ClickResume()
{
pausecanvas.setavtive(false);
}

thats it