Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

Add float value to ui text in unity

//Attach your Text Object in the Inpsector
public Text goldUi;
float gold = 3;

goldUi.text = "You have" + gold.ToString("00") + "gold";
//This will display: You have 3 gold
Comment

PREVIOUS NEXT
Code Example
Csharp :: unity get scene index 
Csharp :: unity convert mouse position to world position in editor mode 
Csharp :: c# exit application 
Csharp :: unity list 
Csharp :: executable path with app name c# 
Csharp :: contains with ignore case c# 
Csharp :: db scaffolding ef core 
Csharp :: unity conditional field 
Csharp :: json property annotation c# 
Csharp :: unity gameobject.find not working 
Csharp :: jitter on collision for 2 rigid bodies 
Csharp :: c# print array 
Csharp :: Unity C# make object face away 
Csharp :: find many object with tag unity 
Csharp :: c# check if is float 
Csharp :: unity length of string 
Csharp :: xamarin timer example 
Csharp :: gcd c# 
Csharp :: how to get desktop name in c# 
Csharp :: c# object initialization can be simplified 
Csharp :: Generate UUID in c# 
Csharp :: unity c# check if multiple keys are pressed 
Csharp :: get desktop path c# 
Csharp :: lump in neck under jaw 
Csharp :: .net core add header to soap request 
Csharp :: c# console beep sounds 
Csharp :: bubble sort in c# 
Csharp :: c# unity follow object 
Csharp :: The terminal process failed to launch: Path to shell executable "dotnet" is not a file or a symlink. 
Csharp :: unity change particle system sorting layer via script 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =