Formatting Strings?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;


public class CreateNewCharacter : MonoBehaviour {
    private BasePlayer newPlayer;
    private bool isMageClass;
    private bool isWarriorClass;
    private string playerName = "EnterName";
    public Text staText;
  


    // Use this for initialization
    void Start () {
        newPlayer = new BasePlayer();
        //staText.GetComponent("stattext");
        OnShowText();
      
      
    
    }
  
    // Update is called once per frame
    void Update () {
      
    }

    void OnShowText()
    {
      
        newPlayer = new BaseWarriorClass();
        staText.text =staText.text + "  Mana Level " + newPlayer.Mana + "Power Level" +
            newPlayer.Power + "Speed" + newPlayer.Speed + "Knowledge"+ newPlayer.Knowledge
            + "Stamina" +  newPlayer.Stamina + "Endurance" +  newPlayer.Endurance
            + "Energy" + newPlayer.Energy;
          
      


      
    }

  
}

Can’t figure out how to format my values to show up on unity.

Some reason your code tags didn’t work.

What is your desired result? Right now you just have one long string. Personally that probably isn’t the best way, you should probably have several text objects and only update the one that needs updating. If you want a new line char, you need to use \n inside “” to move to the next line before displaying text. So, like “\nPower Level” for example.

Awesome!

Awesome got it too work thanks!