|
I have a script that simply declares some variables, outside of functions-- just meant to be member variables. ScriptA, let's call it. I attach it to an object. In that same object, in a different script (ScriptB? Sure, why not?), I get ScriptA component, but when I try to get a variable or call a method, MonoDevelop refuses to acknowledge it in autocomplete. However, if I test the game, I can see that the variables and methods are being called. I tried resyncing MonoDevelop, but I'm still not getting any autocomplete... it just forces me to really focus on typos, when I'd rather be focusing on writing code. Plus, I gotta keep jumping to the other script to remind myself of these members. My code looks something like this: ScriptA (attached to someObject ): ScriptB (also attached to someObject): Like I said, I can still call the members and see the results in console or in game... but I MonoDevelop doesn't show me any of them as I code. Do I need to include the other scripts or something?
(comments are locked)
|

Monodevelop isn't very good for autocomplete in Javascript. If you mark your members as explicitly public, does that help?
No, it doesn't help. Tried turning the variables public, and then tried a resync to be doubly sure.
Autocomplete was one of the biggest reasons I started using C#. Monodevelop is far smarter with C# syntax and autocompletion that it is with js.
Well, it helps that C# doesn't have fuzzy types like JS does. Honestly, I don't blame MonoDevelop for not knowing what's going on there with JS files, they're so messy!
Well then-- I'm early enough in development to port everything over to C#... is there anything right off the top of your head I should keep in mind or read up on about C# in Unity before I begin porting?