'Speech' does not exist in the namespace 'System'

1.7k Views Asked by At

In Unity, trying to use System.Speech in my C# script and I am getting this error:

The type or namespace name 'Speech' does not exist in the namespace 'System' (are you missing an assembly reference?)

I downloaded the System.Speech.dll and put it inside the \Library\ScriptAssemblies of my Unity project, however every time I compile the project, this folder gets cleaned and all the DLL gets lost.

I am new to C# and Unity, is there a way that I can manage to keep the file in the folder? I am trying to find the script that builds the project to modify it and not clean everything before the build, but no solution yet.

2

There are 2 best solutions below

2
On BEST ANSWER

Instead of putting the DLL file inside \Library\ScriptAssemblies I think the DLL file is just supposed to go into the assets folder then save your project and relaunch unity and visual studio

0
On

https://docs.unity3d.com/Manual/UsingDLL.html

Managed plugins (dlls) should be put in the assets folder.