Is Godot going to make a PluginScript for C++ in the future?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Joe0239

It will be great to have Godot to have a nice PluginScript for C++ that essentially allows users to simply create a C++ script and attach it onto a node without the hassle.

:bust_in_silhouette: Reply From: Zylann

That’s technically what NativeScript and C++ binding are already. The latter is not easy to use yet IMO, but you will never be able to write a Cpp file, attach it to a node and see it work instantly. This is is not the way C++ works (you must also have a very good reason to want C++ as a “scripting” language…).

I think it has been said already on multiple platforms (Github, Discord, and probably here on Q&A). In order for this to work, you have to compile C++ code into a library. For that you need a compiler toolchain (Visual Studio, GCC, MinGW…), which we cannot supply within Godot. Then you tell Godot where the library is, tell Godot which classes are inside and have a file representing each class so you can finally drag and drop to a node.
This workflow is already what NativeScript currently provides. I have no idea if using PluginScript for that would even be different.

This could happen automatically but it requires a lot of things to setup. And even if made automatic, it would have to deal with far more advanced situations than regular GDScripts, with libraries that have dependencies, build systems involved, compilation flags, developing on Windows, Mac, Linux etc.

In any case, I don’t know if anything is planned, but nothing will happen until someone works on automating this (it doesn’t have to be the main devs, it can be anyone knowing C++ enough, including you).

That is what I mean, if it can automatically happen, that is what I mean by a plugin script that literally handles everything (converting cpp to dll) that sort of stuff (sorry for not understanding what plugin script is).

Joe0239 | 2018-02-25 00:53