I want to make a dialogue in a 2D game that starts using Raycast, but an error comes out


I was creating a game based on Unity’s learning “2D beginner adventure game” No matter how much I checked, but I didn’t miss a single step. I copied the script completely from there, but there are no errors in it. I don’t understand why the dialog box is not displayed.

Where is the error?

A null-reference error means something you’re trying to access isn’t present. You need to figure out why it’s null, and stop it from being null.

That’s all the advice we can give as we can’t see your code. The issue might be something in project set up as well.