Hi everybody!

I tried creating an EditorPlugin in C# following the tutorial in the documentation. It worked well, but trying to extend this example I quickly noticed that Intellisense wouldn´t work inside the "#if TOOLS"-block, both in Visual Studio Code and 2019. Apparently this is the expected behaviour, but I was wondering if there was any way to work around it?

The obvious thing would be to remove the #if TOOLS while coding, but that only leads to EditorPlugin not being found in the assembly or directive, i.e. no Intellisense that way either. And since the Godot-Mono documentation isn´t complete, the only way seems to be to use the GDscript documentation and guess the C# equivalent.

Does anyone have any idea or suggestion? Would it be possible to make a small change to the Godot source to allow EditorPlugin to be used outside a TOOLS-block or would that lead to other problems?

Thanks!

I don't know much about C# with Godot, nor do I about VS Code. I think Intellisense is code completion, and although it's not full code completion, I get all of my needs served by using Atom with the necessary files open in background tabs. My personal philosophy is that I shouldn't be getting too used to little assistants like this until I have professional experience, however I don't know your experience level.

If you're interested in editing the Godot source, I would say to just start reading through the source, making sense of it and when you think you've found the reason why you can't use Intellisense within an #ifTOOLS block (it sounds like you've researched your problem and may have a starting point to begin editing), start playing with it until your problem is solved. Again, I don't know your programming experience (probably more than me), but Godot is an open source project, you're meant to hack around with it and learn. You have nothing to lose aside from the time spent messing around in the code, but if you're developing games on a hobbyist level, you probably have enough free time. Go for it. I'd be interested in seeing your edits, just as an idea of where I might want to start myself.

https://github.com/godotengine/godot/tree/master/editor/plugins

I wish i had the insight necessary to help you here, beyond the abstract ideas.

Thanks! I´ve started looking into the source code for some issues, but I haven´t gotten to grips with how the Mono bindings work. That´s still a mystery to me. ;)

3 years later