Author Topic: Display system data on screen  (Read 2198 times)

mikez69

  • Guest
Display system data on screen
« on: October 24, 2013, 03:56:13 PM »
I am interested in using NGUI to display some system data on screen:

-Frames Per Second
-Draw Calls
-Current Input (What keys &/or gamepad controls are being pressed)

Does anyone have any scripts, input or insight/best practices to do this?  I have some C# skills but just not enough to be useful here.

Thanks in advance!

mikez69

  • Guest
Re: Display system data on screen
« Reply #1 on: October 28, 2013, 03:32:11 PM »
Anyone at all?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Display system data on screen
« Reply #2 on: October 29, 2013, 12:51:40 AM »
This is a very basic question. Create a label, and add a new script to it. In the script, set the label's text to what you need it to be like so:
  1. using UnityEngine;
  2.  
  3. public class MyScript : MonoBehaviour
  4. {
  5.     void Update()
  6.     {
  7.         UILabel lbl = GetComponent<UILabel>();
  8.         lbl.text = UIDrawCall.list.size.ToString();
  9.     }
  10. }