Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

unity set material

gameObject.GetComponent<Renderer>().material = newMaterial;
Comment

unity set material


// in the Start() method
Material yourMaterial = Resources.Load("red", typeof(Material)) as Material;

Comment

PREVIOUS NEXT
Code Example
Csharp :: photon rpc 
Csharp :: C# .net core convert to int round up 
Csharp :: singleton unity 
Csharp :: c# generate random number 
Csharp :: c# loop through files in folder 
Csharp :: update models with ef core 
Csharp :: dotnet ef migrations to folder 
Csharp :: casting string to enum type 
Csharp :: replace double backslash with single backslash c# 
Csharp :: c# difference between two dates in milliseconds C# 
Csharp :: c sharp stream to byte array 
Csharp :: VLC .net 
Csharp :: c# get last item in list 
Csharp :: how to set up blender with unity units 
Csharp :: wpf set color in code 
Csharp :: swaggergen add service not getting info in .net core 
Csharp :: visual studio fix formatting 
Csharp :: how to make a mouse down condition in unity 
Csharp :: instantiate unity 
Csharp :: unity cos 
Csharp :: rotating an object in unity 
Csharp :: c# console save file 
Csharp :: vb.net console log 
Csharp :: c# bitmap to byte array 
Csharp :: failed to read the request form. missing content-type boundary .net core 
Csharp :: move files from one folder to another using c# 
Csharp :: c# reflection resize array 
Csharp :: how to generate random number in unity 
Csharp :: getcomponent unity 
Csharp :: c# add multiple items to list 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =