DeepAR Scripting API v5.6.15

Namespace: Debug

Debug

Collection of functions to aid the debugging while developing a DeepAR effect.

Members

(static, readonly) Color :uint

Colors for foreground and background of the debug text rendered via Debug.renderText() function.
Type:
  • uint
Properties:
Name Type Description
NONE uint No color (transparent).
RED uint Red color.
GREEN uint Green color.
YELLOW uint Yellow color.
BLUE uint Blue color.
MAGENTA uint Magenta color.
CYAN uint Cyan color.
WHITE uint White color.

Methods

(static) log(message)

Outputs the info log message to the DeepAR Studio console. Same as Debug.logInfo() function.
Parameters:
Name Type Description
message string Info log message.

(static) logError(message)

Outputs the error log message to the DeepAR Studio console.
Parameters:
Name Type Description
message string Error log message.

(static) logInfo(message)

Outputs the info log message to the DeepAR Studio console. Same as Debug.log() function.
Parameters:
Name Type Description
message string Info log message.

(static) logWarning(message)

Outputs the warning log message to the DeepAR Studio console.
Parameters:
Name Type Description
message string Warning log message.

(static) renderText(x, y, text, foregroundColoropt, backgroundColoropt)

Renders debug text on the frame with a monospaced low-resolution font.
Parameters:
Name Type Attributes Default Description
x uint Horizontal text position offset from the left. One unit is equal to a single font character width.
y uint Vertical text position offset from the top. One unit is equal to a single font character height.
text string Debug text to be rendered.
foregroundColor Debug.Color <optional>
Debug.Color.WHITE Foreground color of the debug text.
backgroundColor Debug.Color <optional>
Debug.Color.NONE Background color of the debug text.