Page 1 of 1

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

Posted: Fri Jul 23, 2021 11:09 am
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);
    }


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

Posted: Fri Jul 23, 2021 11:28 am
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.

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

Posted: Fri Jul 23, 2021 11:52 am
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!

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

Posted: Fri Jul 23, 2021 12:55 pm
by Tony Li
Thanks! Glad to help! :-)