Can't Access Namespace

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Ant
Posts: 12
Joined: Mon Jun 08, 2020 11:52 am

Can't Access Namespace

Post 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
Attachments
DialogueNamespaceIssue.png
DialogueNamespaceIssue.png (184.77 KiB) Viewed 2040 times
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Can't Access Namespace

Post 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).
Ant
Posts: 12
Joined: Mon Jun 08, 2020 11:52 am

Re: Can't Access Namespace

Post 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
Ant
Posts: 12
Joined: Mon Jun 08, 2020 11:52 am

Re: Can't Access Namespace

Post 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??
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Can't Access Namespace

Post by Tony Li »

Did you inspect the QuestMachine asmdef and add a reference to the DialogueSystem asmdef?
Ant
Posts: 12
Joined: Mon Jun 08, 2020 11:52 am

Re: Can't Access Namespace

Post 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.
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Can't Access Namespace

Post 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.
Post Reply