Page 1 of 1
Can't Access Namespace
Posted: Tue Sep 21, 2021 5:01 am
by Ant
Howdy,
I need to update variables from my own scripts but I'm having a problem accessing the DialogueManager namespace - well, any PixelCrushers scripts really. All the files remain as "Miscellaneous" in Visual Studio. I've tried rebuilding the project solution and moving the Pixel Crushers folder but that just seems to break everything.
Any help would be greatly appreciated.
Thanks,
Ant
Re: Can't Access Namespace
Posted: Tue Sep 21, 2021 8:39 am
by Tony Li
Hi,
It's best to leave the Dialogue System in the Plugins folder, which is a
Unity special folder.
What does the error look like in your script?
Are you using assembly definitions (asmdefs)? If so, then you can import the Dialogue System's asmdefs by importing Plugins / Pixel Crushers / Dialogue System / Scripts / DialogueSystemAssemblyDefinitions.unitypackage. Then you can assign the DialogueSystem and PixelCrushers asmdefs to your own asmdef(s).
Re: Can't Access Namespace
Posted: Wed Sep 22, 2021 5:06 am
by Ant
Howdy Tony, thanks for your reply.
I tried installing the suggested package but it didn't seem to rectify the issue. I ended up uninstalling all Pixel Crusher packages, updating everything then reinstalling - I can now access the PixelCrushers asmdefs and vice versa - just need to set up everything back in the Unity editor and I'll be good to go.
Thanks,
Ant
Re: Can't Access Namespace
Posted: Wed Sep 22, 2021 5:21 am
by Ant
Spoke too soon...
Just installed the "Dialogue System Support" packages (from Common & Quest Machine) and the issue has reappeared. So installing those seems to make the DialogueManager.cs (and other scripts) unreachable...
Any ideas??
Re: Can't Access Namespace
Posted: Wed Sep 22, 2021 8:30 am
by Tony Li
Did you inspect the QuestMachine asmdef and add a reference to the DialogueSystem asmdef?
Re: Can't Access Namespace
Posted: Wed Sep 22, 2021 9:10 am
by Ant
Hi Tony,
I'm mostly self-taught in C# so terminology wise, I'm atrocius, or atroc#ius if you will...
I'm not sure what you mean by "add a reference to the DS asmdef from the QM asmdef"
In the DialogueSystemQuestMachineBridge script, it can access the dialogue system namespace (asmdef?), I didn't add anything.
So prior to adding the support packages, I could go in one of my scripts and type "using Pix" and it would autocomplete to PixelCrushers.DialogueSystem for example - now it doesn't recognise it anymore. I apologise again for my inept description of the problem. I'll keep tinkering and see if I can sort it.
Re: Can't Access Namespace
Posted: Wed Sep 22, 2021 9:14 am
by Tony Li
Hi,
Does the project compile in Unity? (i.e., no red compiler errors in the Console window)
If so, then the issue is probably with Unity's Visual Studio integration. In this case, open the Package Manager window and update the Visual Studio for Unity package. If that doesn't work, try downgrading the version of the package.
If the project doesn't compile, then the issue is probably with the asmdefs. If this is the case, let me know and we'll look into it further here.