Error! need help

i’m on triggering Dialogue action lesson in Unity RPG Dialogue & Quests: Intermediate C# Game Coding.
the last time everything was working just fine, i saved the project and when i Opened Unity again to continue the course, strange errors everywhere!

the first error was something about the “shader” and a missing script somewhere in the windmill Area. i just deleted the windmill area to solve the problem but i didnt understand why that happened.

All was working just fine the last time i opened unity but now i get this strange errors:

NullReferenceException: Object reference not set to an instance of an object
RPG.Dialogue.PlayerConversant.StartDialogue (RPG.Dialogue.Dialogue newDialogue) (at Assets/Scripts/Dialogue/PlayerConversant.cs:22)
RPG.Dialogue.AIConversant.HandleRaycast (RPG.Control.PlayerController callingController) (at Assets/Scripts/Dialogue/AIConversant.cs:26)
RPG.Control.PlayerController.InteractWithComponent () (at Assets/Scripts/Control/PlayerController.cs:79)
RPG.Control.PlayerController.Update () (at Assets/Scripts/Control/PlayerController.cs:43)

image

to solve the error i tried following the previous lessons, restart unity many times, And even copy your scripts from gitub.
Dont know what happen but i cannot solve this alone!.

The first two errors (warnings) are nothing, my guess is you’re using the starter project. The windmill originally had a script to make the fan turn, but it wasn’t included in the package. The shader error deals with the shrubbery/trees and can be largely ignored.

A null reference error in this context usually means that something isn’t assigned in the inspector. In this case, we know we have an AIConversant and a PlayerConversant (because they’re talking to each other), so mostly likely the Dialogue isn’t set in the AIConversant’s Dialogue field.

1 Like

Privacy & Terms