UnityScripterAI
Discord ↗
Link Copied to Clipboard
×
"dialogue box pop up before player start press button to proceed"
using UnityEngine; using UnityEngine.UI; public class DialogueBox : MonoBehaviour { public GameObject dialogueBox; public Button proceedButton; public Text dialogueText; private void Start() { dialogueBox.SetActive(true); proceedButton.onClick.AddListener(Proceed); dialogueText.text = "Press the button to proceed"; } private void Proceed() { dialogueBox.SetActive(false); // Add any code here to start the game or continue with the next action } }