Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: starl on September 16, 2013, 06:29:41 PM
-
I need to create a console for my game that will primarily log messages sent to it like the Unity one, except I need this one to display on a device (iPhone) so I can see error messages if it's not hooked up at the time. If there is a way to get the Unity one to work like that then let me know and I can skip making this. :D
I started testing this out with UiTextList but found that it didn't scroll and I've seen lots of comments about it being only an example.
I've also seen some comments about using a table and dynamically creating a prefab label and adding to that table (I assume for each new line of text).
If anyone can offer some advice or point me at a solid example I would really appreciate it.
Warning: New at Unity and newer at NGUI (paid version) so please be gentle with your explanations.
-
Easiest way? Use NGUIDebug.Log instead of Debug.Log.
-
Or you can maintain the use of Debug.Log and just use the Unity Log Callback: http://docs.unity3d.com/Documentation/ScriptReference/Application.LogCallback.html (http://docs.unity3d.com/Documentation/ScriptReference/Application.LogCallback.html):
Then unfortunately you'll need to handle the rendering yourself. I'd suggest looking at using a DraggablePanel: http://www.tasharen.com/?page_id=4444 (http://www.tasharen.com/?page_id=4444)
[edit]Although probably overkill if you're not too bothered about scrolling up through the log's history