karim.salama Posted November 16, 2021 Posted November 16, 2021 Hi, I'm currently porting a custom editor from 2.6.1 to 2.15-alpha. Usually, when running the editor, a `-editor_plugin` argument is added with a .plugin file, which makes it an entry point for UnigneScript code. Apparently, in recent versions, this argument and .plugin files are no longer supported. In that case, does this mean that all the UnigineScript code must be rewritten in C++? or is there another way to add an entry point to UnigineScript code for a custom editor plugin? Thanks in advance
victor Posted November 17, 2021 Posted November 17, 2021 Hello Karim, Editor's API is C++ only. In the future we will plan to add C# support for it. Therefore a custom Editor plugin should be written on C++ and with Qt framework. We are working on removing Qt from the Editor's API, but I'm not sure it happens soon. There is such an article to create a custom Editor plugin for 2.14: https://developer.unigine.com/en/docs/2.14.1/editor2/extensions/custom_plugin?rlang=cpp For 2.15 we will improve and simplify creating of a custom Editor plugin, but it's necessary to wait for several weeks when the next release happens. You are able to write entry points for your UnigineScript code in three places: system, editor and world scripts. You can read more here: https://developer.unigine.com/en/docs/future/code/fundamentals/execution_sequence/app_logic_system world script. In this case your script will be executed when some particular world is loaded. You can read more here: https://developer.unigine.com/en/docs/future/code/uniginescript/add_scripts/?rlang=cpp#usc_file system script. You need to add the command-line option '-system_script' with a file path on your UnigineScript file or put it into the bootconfig file. You can read more here: https://developer.unigine.com/en/docs/future/code/command_line?words=system_script#highlight https://developer.unigine.com/en/docs/future/api/library/engine/class.bootconfig?rlang=cpp&words=system_script#highlight editor script. To add some entry point to this script you should modify some internal Editor's script - /data/editor2/editor.usc. This file is packed into the /data/editor2.ung archive. 1
Recommended Posts