Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

GUI.TextArea

Discussion in 'Scripting' started by NewBie01, Mar 8, 2015.

  1. NewBie01

    NewBie01

    Joined:
    Feb 22, 2015
    Posts:
    7
    (chessgame)i wanted to put the logs in the textarea but it seems like whenever i move a piece, it overwrites the log. what i wanted is whenever i move the piece i wanted the log to go next line :3 sorry for being such a newbie :3

    here's the code:

    GUI.TextArea(new Rect(1070,30,250,250),(text));
    text = "Player " + Player + " " + PieceName + " " + "Moved" + " " + PieceMove + " " + "ate" + " " + PieceEat + "\n";
     
  2. derPuppeteer

    derPuppeteer

    Joined:
    Mar 21, 2014
    Posts:
    23
    Hi!

    Try:
    text += "Player " + Player + " " + PieceName + " " + "Moved" + " " + PieceMove + " " + "ate" + " " + PieceEat + "\n";
     
    NewBie01 likes this.
  3. NewBie01

    NewBie01

    Joined:
    Feb 22, 2015
    Posts:
    7
    thank you sir :) it worked sir but it seemed to be infinite :( can u help me with it?