Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

how to make text show a variable in unity

 using UnityEngine.UI;  //its a must to access new UI in script
 public class YourClass : MonoBehaviour
 {
     public Text Score_UIText; // assign it from inspector
 void Start()
 {
    Score_UIText.text = yourscore_variable;
 }
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to convert date to Complete ISO-8601 date in c# 
Csharp :: c# how to fill a datatable 
Csharp :: unity gameobject.find 
Csharp :: how to use navmeshagent in unity 
Csharp :: c# thread 
Csharp :: how to check if the value is alphabet only in c# 
Csharp :: c# get folder path from file path 
Csharp :: unity pause game c# 
Csharp :: split string on last element 
Csharp :: raylib c# basic window 
Csharp :: count number of properties on an object C# 
Csharp :: unity print vs debug log 
Csharp :: unity editor script 
Csharp :: create new .net project 
Csharp :: c# return task list 
Csharp :: destroy the game object if the animator has finished its animation 
Csharp :: how to set picturebox width with form width in c# 
Csharp :: c# read csv file 
Csharp :: how to add headers to scripts in unity 
Csharp :: sqldatareader in c# 
Csharp :: multi line comment c# 
Csharp :: ternary operator in c# 
Csharp :: how to set foreground from code wpf 
Csharp :: unity sort a list 
Csharp :: columndefinition wpf 
Csharp :: how to get current dir in c# 
Csharp :: c# list.foreach 
Csharp :: unity rigid body variable 
Csharp :: how to type to console in unity 
Csharp :: linq query in c# 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =