using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace RPG.Dialogue
{
public class AIConversant : MonoBehaviour
{
[SerializeField] Dialogue dialogue = null;
void OnTriggerEnter(Collider other)
{
if(other.gameObject.tag == "Player")
{
if(Input.GetKeyDown(KeyCode.E))
{
GetComponent<PlayerConversant>().StartDialogue(dialogue);
}
}
}
}
}
Attached the script to my AI and select the dialogue but nothing happens when I enter the trigger area and press “E”. Do I also need to modify my PlayerConversant.cs?