Tuesday, 15 September 2015

how to display 3d text dynamically at unity

using UnityEngine;
using System.Collections;

public class PlayerNameScript : MonoBehaviour {



    string playerName = "SatyaDev";
    // Use this for initialization
    void Start () {

        photonView = this.GetComponent<PhotonView>();
    }
    
    // Update is called once per frame
    void Update () {
        
        GetComponent<TextMesh> ().text = playerName;

    }
    
}




No comments:

Post a Comment