UHFPS
Search
K
Comment on page

Meet and Talk

Meet and Talk will help you create dialogues for your games, even very complex ones
  1. 1.
    Follow the documentation of the plugin to create the first dialogue.
  1. 2.
    Go to Meet and Talk -> Example folder and drag the Meet And Talk prefab into the scene.
  2. 3.
    Create a new script called UHFPSDialogueLocker.cs that will handle player locking during dialogue.
using UHFPS.Runtime;
using UnityEngine;
namespace UHFPS.Integrations.MeetAndTalk
{
public class UHFPSDialogueLocker : MonoBehaviour
{
private GameManager gameManager;
private void Awake()
{
gameManager = GameManager.Instance;
}
public void LockPlayerForDialogue()
{
gameManager.FreezePlayer(true, true);
gameManager.DisableAllGamePanels();
}
public void UnlockPlayerForDialogue()
{
gameManager.FreezePlayer(false, false);
gameManager.ShowPanel(GameManager.PanelType.MainPanel);
}
}
}
  1. 3.
    Add UHFPSDialogueLocker to the Meet and Talk -> Dialogue Manager prefab and set the Dialogue Manager dialogue events to LockPlayerForDialogue() and UnlockPlayerForDialogue().
  1. 3.
    Create a new script called UHFPSDialogueStarter.cs that will be used to start the dialogue.
using UnityEngine;
using MEET_AND_TALK;
using UHFPS.Runtime;
namespace UHFPS.Integrations.MeetAndTalk
{
public class UHFPSDialogueStarter : MonoBehaviour, IInteractStart
{
public DialogueContainerSO dialogueContainer;
public void InteractStart()
{
DialogueManager.Instance.StartDialogue(dialogueContainer);
}
}
}
  1. 4.
    In your NPC, set the layer to Interact, which will allow you to interact with the NPC. Additionally, add the UHFPSDialogueStarter component to it.
  2. 5.
    Assign the dialogue asset to the Dialogue Container field.
Unity Asset Store link to the Meet and Talk asset page:
Guide created by: Ravl & TW (Patrick)
Last modified 4mo ago