Jump to content

Ability to set console title


photo

Recommended Posts

Would it also be possible to add the possibility to set the window title of *both* the Console window and the Unigine window at startup? (maybe a command line option?) That would be great to help with other tools that are used to position all windows on the user desktop and are working with their title! Thanks!

Link to comment
6 hours ago, silent said:

As far as I know console window appears only in debug builds. Is that your use case? Could you please send us an example of how this window looks like and when it appears?

When starting a launcher BAT file (for eg. lauch_release.bat), it creates a (normal) CMD.exe windows that starts a new console window titled "<path_to_exe>" and a graphic view titled "UNIGINE Engine". The initial "CMD.exe" closes itself but the "<path_to_exe>" is always here, even for release/debug/development/non-development build. It is only invisible if you use the "Create Build" feature of the 2.10 editor but we don't use this (for a few reasons, irrelevant at this moment). By the way, the "Create Build" does not copy the IG plugins.

image.png.4d0524f0741d8a3b342598b5ab637933.png

Our use-case is we launch multiple slaves on the same PC, each with a different setting, and we need to position each window at a specific location. This is easy to do if the window have a unique name. A start-up command line option like -title "graphic_title" -console-title "console-title" would help :-)

Link to comment

Stephane,

To change the console title, you can modify your application main function and rebuild it. Here is an MSDN example how to do it properly: https://docs.microsoft.com/en-us/windows/console/setconsoletitle#examples

As a result you can get the following console naming:

image.png

Unfortunately, I could not find a way to change the console title without recompiling the actual application.

I guess you should be able to parse arguments your main function and modify console and window title as you want (console - using Windows API and the window title via Unigine API) :)

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment
×
×
  • Create New...