This is similar to the normal LogsAtGameObject(), but the text block gets formatted from a screenspace point of view. Additionally you can see the log text block also if the log carrying GameObject is out of sight.
The camera which defines the screenspace can be appointed in several ways. One option is: Every function has an overload that is identical except that it takes a Camera as first parameter. Another more convenient option is: If no Camera is supplied then Draw XXL automatically searches for one according to the global DefaultScreenspaceWindowForDrawing setting (which can point to a Gameview camera or a Sceneview camera). Moreover there is the option to apoint a camera once to the global defaultCameraForDrawing field, which also has the effect that no camera has to be supplied as parameter to the actual draw functions.
Green parameters are required. Yellow parameters are optional, but have to be supplied in order.
Code snippet names: drawLogsAtGameObjectScreenspace and drawLogsAtGameObjectScreenspace_func.
Parameters:
Type
Parameter Name
Description
GameObject
gameObject
bool
drawNormalPrio
bool
drawWarningPrio
bool
drawErrorPrio
This toggles if error messages get displayed, but also if assertion and exception messages get displayed. (so all "red symbol" log types)
bool
clampIntoScreen
Draw the logs to the screen also if the log carrying GameObject is out of sight (=not in the screens view frustum).
int
maxNumberOfDisplayedLogMessages
float
relTextSizeScaling
Adjusts the text size relative to the default value of 1.
Color
textColor
Color
boxColor
float
widthOfBoxLines_relToViewportHeight
bool
drawnBoxEncapsulatesChildren
float
durationInSec
The duration in seconds how long the drawn thing stays visible. The default value of 0 means that it stays only during the current Update frame. Instead of using this parameter you can also overwrite him with a global setting so you don't always have to supply all other preceding function parameters till you reach this late parameter.