Hi,
Trying to call the DialogManager inside Corgi Inventory script. But it gave me the does not exit error. Tried to include the the pixelrushers name space , but still no go.
I read somewhere that it might’ve the compilation order that might be the reason corgi’s code Is not seeing Pixelcrushers classes.
Any ideas??
DialogManager Does not exist compile error
Re: DialogManager Does not exist compile error
If you include this at the top of the script:
does your code editor report that the namespace 'PixelCrushers.DialogueSystem' does not exist?
If so, are you using the Dialogue System's assembly definition files? (They are not used by default. If you're using them, it because you went through the steps of importing the assembly definition unitypackages.) If you're using the Dialogue System's assembly definition files, you'll need to add them to Corgi's assembly definition files.
If you're not using the Dialogue System's assembly definition files, then the Dialogue System will be in the standard Assembly-CSharp-firstpass assembly that should be accessible to Corgi's assembly definition files. Double check that Corgi's assembly definition files can access Assembly-CSharp-firstpass.
Code: Select all
using PixelCrushers.DialogueSystem;
If so, are you using the Dialogue System's assembly definition files? (They are not used by default. If you're using them, it because you went through the steps of importing the assembly definition unitypackages.) If you're using the Dialogue System's assembly definition files, you'll need to add them to Corgi's assembly definition files.
If you're not using the Dialogue System's assembly definition files, then the Dialogue System will be in the standard Assembly-CSharp-firstpass assembly that should be accessible to Corgi's assembly definition files. Double check that Corgi's assembly definition files can access Assembly-CSharp-firstpass.
Re: DialogManager Does not exist compile error
using PixelCrushers.DialogueSystem;
Yes, I put the using namespace code above on top the itemPicker.cs and Unity gives a compile error,
error CS0246: The type or namespace name 'PixelCrushers' could not be found (are you missing a using directive or an assembly reference?)
I can call DialogueMmanager in everywhere else in the project, including the topdown engine code, but only in the Inventory classes I can't reference the PixelCrusher namespace and call any codes.
Really strange.
How to I
Double check that Corgi's assembly definition files can access Assembly-CSharp-firstpass.
Yes, I put the using namespace code above on top the itemPicker.cs and Unity gives a compile error,
error CS0246: The type or namespace name 'PixelCrushers' could not be found (are you missing a using directive or an assembly reference?)
I can call DialogueMmanager in everywhere else in the project, including the topdown engine code, but only in the Inventory classes I can't reference the PixelCrusher namespace and call any codes.
Really strange.
How to I
Double check that Corgi's assembly definition files can access Assembly-CSharp-firstpass.
Re: DialogManager Does not exist compile error
Hi,
As Renaud mentioned on discord, Corgi is locked away in an assembly definition.
Instead of directly modifying ItemPicker.cs -- which would be a bad idea anyway since you'll lose your customizations every time you update Corgi -- make a subclass.
For example, to show a DS alert message when picking up an item, create a new script like this:
ItemPickerWithAlert.cs
As Renaud mentioned on discord, Corgi is locked away in an assembly definition.
Instead of directly modifying ItemPicker.cs -- which would be a bad idea anyway since you'll lose your customizations every time you update Corgi -- make a subclass.
For example, to show a DS alert message when picking up an item, create a new script like this:
ItemPickerWithAlert.cs
Code: Select all
using MoreMountains.InventoryEngine;
using PixelCrushers.DialogueSystem;
public class ItemPickerWithAlert : ItemPicker
{
protected override void PickSuccess()
{
base.PickSuccess();
DialogueManager.ShowAlert("Picked up " + Item.ItemName);
}
}
Re: DialogManager Does not exist compile error
I was able to get it to work by writing my own class thanks.
Re: DialogManager Does not exist compile error
Great! Glad to help.