When creating logic, you often want to debug what's happening, to make sure correct values are set in correct places, and certain nodes are executing at the right time. Essentially, this is to make sure there are no bugs in your game.
If something is not working, this is also useful to figure out where things are going wrong.
The most common way of debugging is to log values. In HypeHype this can be done by using the Log node, but optionally you can also use Text or UI to show values on the screen.
When the Log node is executed, it will print the input values to the Log on top of the screen. You can set different Log Levels based on your need, but the most commonly used is Info. The options for Warning and Error are also present.
Supported value types for Log node are Text, Number and Vector.
Log will be printed in the following format if all values are input:
Text 123 [123,123,123]
Once you tap the log in the top, it will be opened full-screen. From the top you can filter the logged values, and on the bottom-right you can pause, copy and clear the log.
Another way to log values is to pass them to Text or UI nodes. Before the Log node was added, this was the main way to log values, and can come in handy when you want to show debug values in the 3D world, for example, above the specific object.
If your game has player progress, you can track saved values during the playtest by tapping View Progress
in the menu on the left. Once you do that, the list of saved nodes will show up on the top-right.
Values will flash green when they are updated.
You can also tap list nodes to see the values stored in the list.
To debug values passed to and from nodes you can use Link debug in test play
. You can find this option from the bottom toolbar once you have selected any node.
Once enabled, you'll see links to and from the selected node in the top-right.
Updated values will flash green, and if you tap the value, you can see a value history graph.