Unity3D Enable/Disable objects, with script Tutorial 20152

Advertisemen

Unity Enable/Disable objects, with script !

Tutorial 20152






































DIRECT DOWNLOAD HERE






















THIS IS BACKUP  IN TEXT FORM  

1. Create New java and name it : DisablePREFABS


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


#pragma strict

var Obj : GameObject;

function Start () {

Obj.SetActive(true);

}

function OnTriggerEnter () { Obj.SetActive (false); }

function OnTriggerExit () { Obj.SetActive(false);
  DontDestroyOnLoad (gameObject);
}



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














THIS IS BACKUP  IN TEXT FORM  

1. Create New java and name it : EnablePrefabs


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


#pragma strict

var Obj : GameObject;

function Start () {

Obj.SetActive(false);

}

function OnTriggerEnter () { Obj.SetActive (true); }

function OnTriggerExit () { Obj.SetActive(true);
  DontDestroyOnLoad (gameObject);
}



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


















THIS IS BACKUP  IN TEXT FORM  

1. Create New java and name it : EnablePrefabsOnAndOff


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


#pragma strict

var Obj : GameObject;

function Start () {

Obj.SetActive(false);

}

function OnTriggerEnter () { Obj.SetActive (true); }

function OnTriggerExit () { Obj.SetActive(false);
  DontDestroyOnLoad (gameObject);
}



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



















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