Hello, Im sorry in advance because I’m extremely new to coding and unity in general.
I’m trying to enable character dialogue using ‘Dialogue Editor’ (see link below) in my 3d first person style game.
I followed all the instructions however when I click on a character to start dialogue I get the error
“NullReferenceException: Object reference not set to an instance of an object”
I am probably missing something super obvious to most but I can’t seem to find the issue in the code or in the inspector.
It’s unlikely this will be super obvious to anyone from what you’ve given. What’s important is where the NullReferenceException is occurring. The full error message includes that information. In addition, if you double-click it, it should take you right to the line of code where the problem was encountered.
NullReferenceException: Object reference not set to an instance of an object
BirdCharacter.OnMouseOver () (at Assets/BirdCharacter.cs:16)
UnityEngine.SendMouseEvents:smile:oSendMouseEvents(Int32)
The error says that something on this line is null. And the only object being dereferenced on this line is ConversationManager.Instance. So, apparently ConversationManager.Instance is null.
Now you need to go ask yourself: how is ConversationManager.Instance supposed to not be null? Were you supposed to put ConversationManager on some script in the scene? If so, are you sure you actually did that? Is the thing you put it on active, and is ConversationManager enabled?
I’ll make sure I include that code area next time, thankyou!
I re-added the testconversation into the character’s script and it seems to be working now! I see what you mean that it wasn’t instancing the correct property. (I know it must sound super dumb when the system is screaming the error at me and I still don’t get it >< )
but anyways thank you!
I have more questions now that this part is working but I should probably start a different thread right?