Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

unity main texture not working

//Get object renderer
rend = GetComponent<MeshRenderer>();

//deprecated do not use
rend.material.maintexture = newTexture;

//proper method
rend.material.SetTexture("_BaseMap",newTexture);
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to split and get last index values in c# 
Csharp :: add row to datagridview c# 
Csharp :: how to instantiate as child unity 
Csharp :: unity game sleep on hit 
Csharp :: how to write blank lines in c#.net 
Csharp :: unity how to load up a scene 
Csharp :: OnCollision update 
Csharp :: move to another scene unity 
Csharp :: c# get current milliseconds 
Csharp :: how to spawn coins randomly around the screen unity 2d 
Csharp :: how to choose a random child in a gameobject unuity 
Csharp :: c# download file 
Csharp :: assign datasource to dropdownlist in c# 
Csharp :: c# fontweight in code 
Csharp :: mymove() method c# 
Csharp :: c# string to uri 
Csharp :: how to run a function as administrator in c# 
Csharp :: bower azure repository tag 
Csharp :: how to change the position of a gameobject in c# unity 
Csharp :: check if network is available c# 
Csharp :: c# cmd 
Csharp :: c# get binary array from int 
Csharp :: c# loop 
Csharp :: how to destroy an object in unity 
Csharp :: data table rename column c# 
Csharp :: visual studio run multiple forms at once 
Csharp :: Unity asset storre download forlder 
Csharp :: c# throw exception 
Csharp :: unity hide in inspector 
Csharp :: how to encode and decode a string in c# 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =