- Home /
Typing anything anywhere in script ceases all functions?
(issue on Unity 4.3.2f1)
As you may know, in monodevelop 4.0.1 just under the tabs there is a bar that states the name of the script and (as it seems) what you're modifying e.g. [C] playerScript > [M] Awake.
This is normally present 100% of the time and the console was clear until randomly I noticed that there were errors, a lot of errors e.g. BCE0044: expecting (, found 'OnTriggerEnter'. and I used OnTriggerEnter as a function.
function OnTriggerEnter () {
I didn't do anything like.
if (OnTriggerEnter == false);
yet there was an error. and I noticed that the [C] playerScript > [M] Awake just said No Selection.
This now happens in any script I modify in any project, even after a reinstall.
I'm not expecting a straight forward answer but any 'fix' attempt would be greatly appreciated.
Answer by ElijahShadbolt · Nov 27, 2016 at 08:35 PM
Are you sure all the code before that function is syntactically correct? I.e. did you forget to include a } or a )?
If your code is perfect, and there are no errors in the console in Unity, you don't have to worry about errors that appear in MonoDevelop or VisualStudio. I don't know why these 'ghost' errors appear, but if it compiles correctly in Unity, it will work.
I personally do not use MonoDevelop anymore, so I did not know there was a little '[C] class > [M] function' hierarchy in the UI, so I cannot help you with that, sorry.
$$anonymous$$y personal fix would be switching to C# and use VisualStudio. ^^ $$anonymous$$onoDevelop is just a conglomerate of many many bugs. I have not counted how many times $$anonymous$$onoDevelop itself crashed or just the intellisense module (where you could strike out "intelli"). Even the code completion module is very "sensitive". If something isn't quite right the auto completion just completely breaks.
VisualStudio on the other hand sometimes even predicts things correctly that hasn't been yet fixed (like a missing namespace). Never (ever) had a crash of VS.
I guess you use sublime? ^^ How well does it integrate into Unity?
As far as unity was concerned before this happened everything was fine, no EOF errors, no missing references... but I have found out since posting this that every time I open a project that has been changed, the Compiling Scripts dialog box always appears for a split second, followed by unity vomiting all these errors back out. It's like it keeps ?re-importing? the scripts with the changes, without success.
As for visual studio which of the 4 versions would you recommend? I know nothing about it and would it be wise to get an older version than the current one?
Ironic to my user name, I do not use SublimeText. I use and adore Visual Studio Community 2015. It is free, and since about Unity 4, it is the recommended/default text editor.
If you want to re-import files so that Unity is sure to find all the changes, you could open the Assets folder in Windows Explorer, check Show Hidden, and delete the file's accompanying .meta file. I'm not sure if this will fix this specific problem, but it's worth a shot.
$$anonymous$$aybe you could give examples of the errors you are receiving, and the associated scripts, please?
Right O$$anonymous$$ this was wierd, but in response most of the errors were like found ( expecting ; but after restarting my laptop (something I already did at least 3 times) its... resolved and I have no idea why. I'm guessing this isn't a common issue, but it's a thing and it's scary.
I sporadically question myself why "Report a problem with unity" existed in the install. Never thought I would ever use it.
Your answer
Follow this Question
Related Questions
C# script editor won't open? What should I do 2 Answers
my Monodevelop can't code, any help or solution? 2 Answers
What is wrong with this shooting script? 2 Answers
Problem with cheatcode 3 Answers
MonoDevelop Template internal variables and functions? 2 Answers