It also allows you to turn any public, non-public, static or non-static method into a console command which you can invoke at runtime by simply typing it's name. It also allows you to specify a custom file to save all debug messages to in an easy to read format. It allows you to view all debug messages in builds, including stacktraces and timestamps, and allows you to collapse duplicates much like Unity's console. I would recommend our new Developer Console asset for this: Hopefully this is enough to get you started though! Also, adding a billboard script and/or tagalong functionality would make it more useful in the HoloLens so it doesn't get in the way. Ideally, you would turn the debug window into something that can wrap and auto-scroll the output text. Public void LogMessage(string message, string stackTrace, LogType type) TextMesh = gameObject.GetComponentInChildren() Īpplication.logMessageReceived += LogMessage Īpplication.logMessageReceived -= LogMessage Here is a simple (but crude) implementation for showing Debug.Log messages in your application:ġ) Create a new '3D Object > 3D Text' object in your sceneĢ) Reset scale (0.1, 0.1, 0.1) and position (0, 0, 2) for comfortĤ) Add the following script to your object for logging messages to the textMesh component: using UnityEngine If you want to see the logs while in the device, then you'll need to create a display window to show the results in your application. Events will show up in Visual Studio when running with the debugger.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
May 2023
Categories |