Let's wire this sucker up

Select the AppManager object and double-click on the ApplicationManager script to open it up in Visual Studio.

Once there, we need to add the following:

public TextMesh debugTextMesh;
public string debugInfoString = "DebugInfo:";

Back in Unity in the Application Manager, the empty slot Debug Text Mesh should appear; drag and drop your DebugInfo object to that slot, as follows:

Great, one last line of code.

Move down to the first empty space in the Start() function and add debugTextMesh.text = debugInfoString;.

This connects our string to our prefab textbox.

Move or hide the other two 3DTextPrefabs and click on the play button; you should see something like this:

If you move it around, it will stay with you. If you don't need it, you can always turn it off in the editor and turn it on when you want.

Now that we have our makeshift debugger, let's finish this chapter with our last section and try out our debug window in the process.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.38.117