Page 1 of 1

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

Posted: Wed Feb 24, 2021 9:07 am
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.

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

Posted: Tue Nov 02, 2021 8:57 am
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?)

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

Posted: Tue Nov 02, 2021 9:37 am
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.