Unity3D Tutorial: 20 How turn off and on the mesh renderer ??

Advertisemen

Unity3D Tutorial: 20 How turn off and on the mesh renderer ??



I will show with one  simple script  How 2  :

Disabling Mesh renderer!
How to active mesh renderer with a script!
Enable/disable mesh renderer component!
unity turn on and off mesh renderer!!!
How to make invisible wall !
AND....







THIS IS Java script: GOOD 4 2D GAMES AND 3D GAMES ! 
----------------------------------------­­­­­­­----------------------------------­-­-­-­-­-­-­------



DIRECT DOWNLOAD HERE


----------------------------------------­­­­­------------------------------------­-­-­-­-­-

THIS IS BACKUP  IN TEXT FORM  TUTORIAL 20
1. Create New java and name it : OnOff meshrenderer

2. Copy & Past this text and save java :
----------------------------------------­­­­­------------------------------------­-­-­-­-­-




#pragma strict

function Start()
 {
   renderer.enabled = true;
 }
function OnTriggerStay (Col : Collider)
{
if(Col.tag == "Player")
{
renderer.enabled = false; 
}
}

function OnTriggerExit (Col : Collider)
{
if(Col.tag == "Player")
{
renderer.enabled = true;
}
}



----------------------------------------­­­­­------------------------------------­-­-­-­-­-



Advertisemen

Disclaimer: Gambar, artikel ataupun video yang ada di web ini terkadang berasal dari berbagai sumber media lain. Hak Cipta sepenuhnya dipegang oleh sumber tersebut. Jika ada masalah terkait hal ini, Anda dapat menghubungi kami disini.

Tidak ada komentar:

Posting Komentar

© Copyright 2017 Tutorial Unity 3D