void OnPreStart()
        {
            //To Do : this method is called before initializing reporter,
            //we can for example check the resultion of our device ,then change the size of reporter
            if (reporter == null)
                reporter = gameObject.GetComponent<Reporter> ();

            if (Screen.width < 1000)
                reporter.size = new Vector2 (32, 32);
            else
                reporter.size = new Vector2 (48, 48);

            reporter.UserData = "Put user date here like his account to know which user is playing on this device";
        }
Ejemplo n.º 2
0
        // Use this for initialization
        void Start()
        {
            Application.runInBackground = true;

            reporter = FindObjectOfType (typeof(Reporter)) as Reporter;
            Debug.Log ("test long text sdf asdfg asdfg sdfgsdfg sdfg sfg" +
            "sdfgsdfg sdfg sdf gsdfg sfdg sf gsdfg sdfg asdfg " +
            "sdfgsdfg sdfg sdf gsdfg sfdg sf gsdfg sdfg asdfg " +
            "sdfgsdfg sdfg sdf gsdfg sfdg sf gsdfg sdfg asdfg " +
            "sdfgsdfg sdfg sdf gsdfg sfdg sf gsdfg sdfg asdfg " +
            "sdfgsdfg sdfg sdf gsdfg sfdg sf gsdfg sdfg asdfg ssssssssssssssssssssss" +
            "asdf asdf asdf asdf adsf \n dfgsdfg sdfg sdf gsdfg sfdg sf gsdfg sdfg asdf" +
            "asdf asdf asdf asdf adsf \n dfgsdfg sdfg sdf gsdfg sfdg sf gsdfg sdfg asdf" +
            "asdf asdf asdf asdf adsf \n dfgsdfg sdfg sdf gsdfg sfdg sf gsdfg sdfg asdf" +
            "asdf asdf asdf asdf adsf \n dfgsdfg sdfg sdf gsdfg sfdg sf gsdfg sdfg asdf" +
            "asdf asdf asdf asdf adsf \n dfgsdfg sdfg sdf gsdfg sfdg sf gsdfg sdfg asdf");

            style = new GUIStyle ();
            style.alignment = TextAnchor.MiddleCenter;
            style.normal.textColor = Color.white;
            style.wordWrap = true;

            for (int i = 0; i < 10; i++) {
                Debug.Log ("Test Collapsed log");
                Debug.LogWarning ("Test Collapsed Warning");
                Debug.LogError ("Test Collapsed Error");
            }

            for (int i = 0; i < 10; i++) {
                Debug.Log ("Test Collapsed log");
                Debug.LogWarning ("Test Collapsed Warning");
                Debug.LogError ("Test Collapsed Error");
            }
            rect1 = new Rect (Screen.width / 2 - 120, Screen.height / 2 - 225, 240, 50);
            rect2 = new Rect (Screen.width / 2 - 120, Screen.height / 2 - 175, 240, 100);
            rect3 = new Rect (Screen.width / 2 - 120, Screen.height / 2 - 50, 240, 50);
            rect4 = new Rect (Screen.width / 2 - 120, Screen.height / 2, 240, 50);
            rect5 = new Rect (Screen.width / 2 - 120, Screen.height / 2 + 50, 240, 50);
            rect6 = new Rect (Screen.width / 2 - 120, Screen.height / 2 + 100, 240, 50);

            Thread thread = new Thread (new ThreadStart (threadLogTest));
            thread.Start ();
        }
Ejemplo n.º 3
0
 void Awake()
 {
     reporter = gameObject.GetComponent<Reporter> ();
 }
 void Start()
 {
     reporter = gameObject.GetComponent<Reporter> ();
 }
 void OnLog(Reporter.Log log)
 {
     //TO DO : put you custom code
 }