[HOWTO] How To: Fix Code Editor Not Recognizing Dialogue System Namespace

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

[HOWTO] How To: Fix Code Editor Not Recognizing Dialogue System Namespace

Post by Tony Li »

This article describes how to resolve issues where your own code can't access Dialogue System scripts.

If your own code uses assembly definition files and you want it to recognize the Dialogue System namespace, import this unitypackage:

Plugins / Pixel Crushers / Dialogue System / Scripts / DialogueSystemAssemblyDefinitions.unitypackage  

This will import 5 assembly definition files:
  • Plugins / Pixel Crushers / Common / PixelCrushers.asmdef
  • Plugins / Pixel Crushers / Common / Scripts / Editor / PixelCrushersEditor.asmdef
  • Plugins / Pixel Crushers / Common / Wrappers / Editor / PixelCrushers.asmdef  
  • Plugins / Pixel Crushers / Dialogue System / DialogueSystem.asmdef
  • Plugins / Pixel Crushers / Dialogue System / DialogueSystemEditor.asmdef
If you have enabled TextMesh Pro integration, you must inspect the asmdefs and assign the TextMesh Pro asmdef to them.

---

If that doesn't completely fix the issue, or if you're not using assembly definitions, then the issue is probably with Unity's integration package with your code editor (e.g., Visual Studio).

First try rebuilding the project files. Select menu item Edit > Preferences. On the External Tools page, click Regenerate project files.

If that doesn't fix it, open the Package Manager window to the Unity Registry page and update or downgrade the integration package for your code editor. For example, if you're using VS Code, update the 'Visual Studio Code Editor' package.
dreternal
Posts: 5
Joined: Sat Oct 23, 2021 11:13 am

Re: [HOWTO] How To: Fix Code Editor Not Recognizing Dialogue System Namespace

Post by dreternal »

That got most of the way there, thanks! Followed each step, but now I'm just getting one error (which is enough) ;)

Assets\Plugins\Pixel Crushers\Dialogue System\Wrappers\Editor\CustomLuaFunctionInfo.cs(13,71): error CS0234: The type or namespace name 'CustomLuaFunctionInfo' does not exist in the namespace 'PixelCrushers.DialogueSystem' (are you missing an assembly reference?)
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: [HOWTO] How To: Fix Code Editor Not Recognizing Dialogue System Namespace

Post by Tony Li »

In an older version of the Dialogue System, the CustomLuaFunctionInfo.cs file was misplaced. The easiest solution is to back up your project, delete the folder Plugins / Pixel Crushers / Dialogue System and reimport the Dialogue System.
Post Reply