SetContinueButtonLabel.cs
Code: Select all
using UnityEngine;
using UnityEngine.UI;
using PixelCrushers.DialogueSystem;
public class SetContinueButtonLabel : MonoBehaviour
{
void OnEnable()
{
if (!DialogueManager.isConversationActive) return;
var label = GetComponentInChildren<Text>(); // Change Text to TMPro.TextMeshProUGUI if using TextMesh Pro.
var labelValue = DialogueManager.currentConversationState.hasAnyResponses ? "Continue" : "End";
label.text = DialogueManager.GetLocalizedText(labelValue); // Localize to current language if available.
}
}