i know many people have asked this question already but i cant seem to fix the error even if i look actively and experiment on many types of codes that i have seen or used. What im trying to achieve is that when i get inside a room the dialogue system will pop up automatically. Here is my code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class McroomDialogueTrigger : MonoBehaviour
{
public McRoomDialogue dialogue;
// Start is called before the first frame update
void Start()
{
TriggerDialogue();
}
public void TriggerDialogue()
{
FindObjectOfType<McroomDialogueManager>().StartDialogues(dialogue);
}
}
This is the code script that is getting errors. I used this before in the first scene of my game and just used different variables on this one. The other one was not working at first and i left it for a sec and it just suddenly became ok. Im confused, can you guys please help me i would very much appreciate it so much.