Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

unity change text color

// To change the color of a text, see below
GameObject.GetComponent<Text>().color = Color.black;
Comment

unity text custom color

//will change the color of the text to red (RGB)
TextGameObject.color = new Color(255, 0, 0);
//will change the color of the text to red with alpha channel (RGBA)
TextGameObject.color = new Color32(255, 0, 0, 0);
Comment

PREVIOUS NEXT
Code Example
Csharp :: linq query to check if record exists 
Csharp :: how to get total scenes unity 
Csharp :: get all components of type unity 
Csharp :: c# distinct array of objects by values 
Csharp :: unity get center of object 
Csharp :: c# dictionary with multiple values 
Csharp :: datetime empty date 
Csharp :: unity how to destroy child 
Csharp :: c# windows forms open directory in explorer 
Csharp :: c# file watcher 
Csharp :: c# remove all punctuation from string 
Csharp :: asp.net core api Self referencing loop detected for property 
Csharp :: c# create array with n elements 
Csharp :: how to concert a list into strinf splitted by coma c# 
Csharp :: dictionary to list c# 
Csharp :: access object property C# 
Csharp :: c# get serial ports 
Csharp :: c# remove duplicates from list 
Csharp :: How to type custom backcolor on c# winform 
Csharp :: emgucv open image c# 
Csharp :: c# max two values 
Csharp :: how to store some variables on the device in unity 
Csharp :: selenium scroll to element c# 
Csharp :: variable size in memory c# 
Csharp :: #ifdef in c 
Csharp :: unity input system 
Csharp :: unity scroll rect to bottom 
Csharp :: quaternion rotation unity 
Csharp :: unity singleton 
Csharp :: print pdf in c# 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =