- Home /
Reference does not stick
Hi There,
So I'm trying to use System.Speech in my code. I've gone into monodevelop and right clicked on references and edited references. Therein I found the desired library and included it and it now shows in the list of references.
Added a using System.Speech.Synthesis and built it successfully. I then went to run my game and it would not execute suggesting I am missing an assembly reference.
If I save and quit both Monodevelop and Unity, next time I enter monodevelop System.Speech is no longer in the references.
What am I doing wrong? Do I need to import the System.Speech DLL as an asset or something? I must stress I have as yet done nothing but attempt to pull in the library so at this point I don't even know if it will work when I have finished that!
Any help would be gratefully received.
Trevor
Answer by rutter · Sep 06, 2014 at 03:48 AM
Do I need to import the System.Speech DLL as an asset or something?
Bingo. Unity is a little weird about how it compiles things. Wants to have all the files for itself.
Besides that, Unity is pretty weird about MonoDevelop's project files in general. Rather than allowing you to make changes to the files, Unity automatically regenerates them on a regular basis. That's fine if you want Unity to "just work", which most people do, but it's annoying as hell if you're an experienced developer who expects that file to work normally.
Ta Rutter. You are definitely correct that is really annoying ;-)
Last night I manually copied the file in and it still failed but I'll try doing so through the import asset later and see what happens.
Okay so I tried this and still no dice. I can get it to work if I just do the include now, but if I try and use an object in the library it still fails.
All the code compiles perfectly in $$anonymous$$ono however Unity itself will just not let it work. It seems to be there are things it does not like when including the library.
Anybody got any ideas?
Your answer

Follow this Question
Related Questions
Microphone to Gameplay mechanics 1 Answer
how to use Android's speechrecognizer in unity ? 0 Answers
Text to speech for android: Italian Language 0 Answers
speech animals not run 1 Answer
In build - Process cannot find file 1 Answer