Jump to content

console_onscreen bracket error System.FormatException


photo

Recommended Posts

Good day,

the brackets "{}" inside the Log function causes an error.

		Unigine.Console.Run("console_onscreen 1");
		Log.Warning("{objValue}");

image.thumb.png.f839a1d9faafa5ac41d2b5c33c25e12b.png

Without using the brackets works, but instead of passing a string "console_onscreen 1" could you make a Unigine.(ConsoleOptions) method to initilize print options? For example:

	public bool initPrintOnce;
	public void print(object objValue = null){
		if (!initPrintOnce) {
			Unigine.Console.Run("console_onscreen 1");
			initPrintOnce = true;
			}	
		Log.Warning($"{objValue}");
	}

You could do print functions such as printMessage, printWarning, printError, printFatal. This would be more comfortable to beginners.

Edited by Sevdat
Link to comment
  • Sevdat changed the title to console_onscreen bracket error System.FormatException
×
×
  • Create New...