'DialogueManager' does not contain a definition for 'StartConversation'

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
xyztankman
Posts: 54
Joined: Mon Jun 21, 2021 7:48 pm

'DialogueManager' does not contain a definition for 'StartConversation'

Post by xyztankman »

Hey Tony,

Getting this error and not sure why, I am trying to start a conversation from a time script and am receiving the error attached.

I am using PixelCrushers.DialogueSystem; and currently have a workaround of enabling an object in the scene, having dialogue triggers set up for starting at the same time as the script enables the object, and disabling the object, adding one minute to the timer.

Code below:

Code: Select all

using PixelCrushers.DialogueSystem;
using UnityEngine;
using UnityEngine.UI;

...

//Event starter that activates when chosen
    public void SpecialStarter()
    {
        if (hour == 7 && day == 1 && minute == 3)
        {
            DialogueManager.StartConversation("Cutscene/Day1");
            TimeTracker.SetActive(true);
            minute++;
            
        }
        else if (hour == 12 && day == 1 && minute == 7)
        {
            TimeTracker.SetActive(true);
        }
        else if (hour == 4 && day == 2 && minute == 3)
        {
            TimeTracker.SetActive(true);
            minute++;
        }
        else TimeTracker.SetActive(false);
    }

Attachments
DialogueError.JPG
DialogueError.JPG (56.84 KiB) Viewed 547 times
User avatar
Tony Li
Posts: 21676
Joined: Thu Jul 18, 2013 1:27 pm

Re: 'DialogueManager' does not contain a definition for 'StartConversation'

Post by Tony Li »

Hi,

Is there another script or class named "DialogueManager" in your project?

If so, you can disambiguate that line like this:

Code: Select all

PixelCrushers.DialogueSystem.DialogueManager.StartConversation("Cutscene/Day1");
Or you can put the other script into its own namespace.
xyztankman
Posts: 54
Joined: Mon Jun 21, 2021 7:48 pm

Re: 'DialogueManager' does not contain a definition for 'StartConversation'

Post by xyztankman »

You were right, I had another DialogueManager script made from a while ago! Deleted it and everything is working again. Thanks Tony!

Also, just wanted to mention that you provide awesome support, really enjoying learning this dialogue system!
User avatar
Tony Li
Posts: 21676
Joined: Thu Jul 18, 2013 1:27 pm

Re: 'DialogueManager' does not contain a definition for 'StartConversation'

Post by Tony Li »

Thanks! Glad to help! :-)
Post Reply