If you have already covered a couple of chapters in this book, you may be familiar with CUDLR, which is an excellent remote logging, debugging, and inspection tool. For those of you that missed the CUDLR setup in Chapter 2, Mapping the Player's Location, no worries, as we will do a review of the setup here. Of course, if you are here because of issues with CUDLR, refer to the final section in this chapter, Issues and Solutions by Chapter.
CUDLR is a remote console that runs through an internal web server created within your game. It uses the same technique we used to output the log output, but it also provides for object inspection and even customization. Use the following instructions to set up CUDLR (if you have already done this, you may want to just skim over this section):
Chapter 10
project, then open a new Unity project and import Chapter10.unitypackage
from the Chapter_10_Assets
folder of the books downloaded source code.Assets/Chapter 10/Scenes
folder.CUDLR
and reset its transform to zero.Server
script from the Assets/CUDLR/Scripts
folder in the Project window onto the new CUDLR
GameObject.CUDLR
sets itself to run on port 55055
. This setting can be changed by inspecting the CUDLR
GameObject in the Inspector window. For now though, leave it at the default value.http://localhost:550555
CUDLR window in a browser (Chrome)
help
Commands: object list : lists all the game objects in the scene object print : lists properties of the object clear : clears console output help : prints commands
object list
CUDLR Directional Light Cube Main Camera
object print Cube
Game Object : Cube Component : UnityEngine.Transform Component : UnityEngine.MeshFilter Component : UnityEngine.BoxCollider Component : UnityEngine.MeshRenderer Component : RotateObject
As we have shown in several sections of this book, CUDLR is also useful for capturing logging activity on a game running on a mobile device. With CUDLR, you could simultaneously track logging output on several devices at the same time. Of course, CUDLR is really only intended for capturing logs while debugging or testing. The internal web server CUDLR creates is not something we would want to ship with our game for numerous reasons.
What if we want to track critical error or exception logs after our game is released? Fortunately, there are a number of options available to do that in Unity and we will look at one of these options in the next section.
3.135.219.166