Forum rules - please read before posting.

Intermittent errors with dialogue, very strange.

edited May 2014 in Technical Q&A
I'm noticing a lot of intermittent errors with dialogue. One in particular is the following:

NullReferenceException: Object reference not set to an instance of an object
Dialog.StartDialog (AC.Char _speakerChar, System.String message, Int32 lineNumber, System.String language) (at Assets/AdventureCreator/Scripts/Speech/Dialog.cs:322)

I've set everything up properly in the speech manager, I've put my corresponding audio files (both ogg and mp3) into the Resources/Speech folder and named them properly. In this case, I'm attempting "Narrator0". 

I was having this error on one machine, so I opened up the project on a different computer and it started to work. Then, I replaced the audio file with a different audio file, it would then keep playing the old version of the audio file. I then transferred it back to the other machine to test, same result. I'm not quite sure where the problem is, maybe with metadata or something?


  • I can't speak for the metadata issue but I think I see the problem with your narration error.  I'll look into a fix for 1.34.
  • Awesome! This plugin is great sir.
  • Is there anything I can do in the meantime to remedy this? I could use another unseen NPC for it, but with my current menu setup, I can only have one menu that presents narration only and one that presents only character dialogue, so I'm kind of in limbo.
  • 1.34 will be out shortly.
  • Hmmm, I've just updated to 1.34 and the narrator option still isn't working. In fact, the gather text option doesn't work anymore either. Also, when I first ran my project, it automatically played the "player0" audio of the robot saying the line about the poster. Hopefully, it's operator error and I can figure it out. 
  • edited June 2014
    OK, operator error for the "Gather text" problem. When I updated to 1.34, it eliminated my scene from my build settings, therefore would not gather text. As per the manual (for those with this problem), "Clicking Gather lines will cause the manager to search all scenes added to the Build Settings (File → Build Settings) and give an ID to every

    Dialogue: Play Speech Action." 

  • For playing back the narrator lines, you'll need to either have an AudioSource on the player, or set a "Default Sound prefab" in the Scene Manager.  Just click "Sound" in the prefab list and drag it over.  Basically it just needs an outlet for the audio.
  • I finally got it working. It works great now. Thank you.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.