UNITY3D WAREHOUSE

WELCOME TO COMMUNITY.

OOOOOMG

I"M SO !!!.

!!!

Coming Soon.

!!!

Coming Soon..

Saturday 31 October 2015

Unity 3D Make Mystery Box Tutorial20153

Unity 3D Make Mystery Box
Spawn random prefab on trigger enter







































DIRECT DOWNLOAD HERE



























THIS IS BACKUP  IN TEXT FORM

1. Create New C# and name it : itemSpawner


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


using UnityEngine;
using System.Collections;

public class itemSpawner : MonoBehaviour {



bool hasSpawned = false;
public GameObject[] itemPrefabs;

void OnTriggerEnter(Collider other)
{
if(other.tag == "Player")
{
if(!hasSpawned)
{
hasSpawned = true;
Spawn();

}
}
}

void Spawn()
{

Instantiate(itemPrefabs[Random.Range(0,itemPrefabs.Length)],transform.position, transform.rotation);
}
}






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













Friday 23 October 2015

Unity3D Enable/Disable objects, with script Tutorial 20152

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);
}



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



















Sunday 18 October 2015

Android Restart Button Tutorial 20151

Android Restart Button Tutorial 20151





























DIRECT DOWNLOAD HERE












THIS IS BACKUP  IN TEXT FORM AndroidRestartButton

1. Create New C# and name it : AndroidRestartButton1

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


using UnityEngine;
using System.Collections;

public class AndroidRestartButton1 : MonoBehaviour {

public Texture2D button1;
public Texture2D button2;





// Use this for initialization
void Start ()
{
guiTexture.texture = button1;
}

// Update is called once per frame
void Update ()
{
foreach (Touch touch in Input.touches)
{
if (guiTexture.HitTest(touch.position) && touch.phase != TouchPhase.Ended)
{
guiTexture.texture = button2;

Application.LoadLevel("level1");


}
else if (guiTexture.HitTest(touch.position) && touch.phase == TouchPhase.Ended)
{
guiTexture.texture = button1;
}
}
}
}




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












THIS IS BACKUP  IN TEXT FORM GUIrescaler

1. Create New JAVA  and name it : GUIrescaler

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



#pragma strict

//here is a special gui rescaler that automatically rescales GUIText and GUITextures so they're not stretched.

private var getTxt:Component;
private var getTxtr:Component;
private var resX:float;
private var resY:float;
private var origResX:float;
private var origResY:float;
private var txtrX:float;
private var txtrY:float;
private var txtX:float;
private var txtY:float;

function Start () {
getTxt = transform.GetComponent(GUIText);
getTxtr = transform.GetComponent(GUITexture);
if(getTxtr == null && getTxt == null){
print("No GUIText or GUITexture exists on: " + transform.gameObject.name);
}

}

function Update () {

if(Screen.width != origResX || Screen.height != origResY){

origResX = Screen.width;
origResY = Screen.height;

if(getTxt != null){
resX = Screen.width;
resY = Screen.height;
txtX = transform.localScale.x;
txtY = transform.localScale.y;
transform.localScale.y = (transform.localScale.x*(resX/resY));
}
if(getTxtr != null){
resX = Screen.width;
resY = Screen.height;
txtrX = transform.guiTexture.texture.width;
txtrY = transform.guiTexture.texture.height;
transform.localScale.y = (transform.localScale.x*(resX/resY))/(txtrX/txtrY);
}
}

}







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










Thursday 8 October 2015

Unity 3D Floating Object float up and down

Unity 3D Floating Object float up and down












DIRECT DOWNLOAD HERE






THIS IS Java# script: GOOD 4 2D GAMES AND 3D GAMES !
----------------------------------------­­­­­­­----------------------------------­-­-­-­-­-­-­------
THIS IS BACKUP  IN TEXT FORM

1. Create New java and name it :  Floating Object


2. Copy & Past this text and save java :



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


#pragma strict

 var floatup;
 function Start(){
     floatup = false;
 }
 function Update(){
     if(floatup)
         floatingup();
     else if(!floatup)
         floatingdown();
 }
 function floatingup(){
     transform.position.y += 0.4 * Time.deltaTime;
     yield WaitForSeconds(1);
     floatup = false;
 }
 function floatingdown(){
     transform.position.y -= 0.4 * Time.deltaTime;;
     yield WaitForSeconds(1);
     floatup = true;
 }



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














BONUS Solution 2
EXTRA OPTION --- Floating Object MoveUpAndDown Solution 2 ..


THIS IS Java# script: GOOD 4 2D GAMES AND 3D GAMES !
----------------------------------------­­­­­­­----------------------------------­-­-­-­-­-­-­------
THIS IS BACKUP  IN TEXT FORM

1. Create New java and name it :  MoveUpAndDown



2. Copy & Past this text and save java :


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



#pragma strict
var amount : float = 1.0;
var speed : float = 4.0;
    function Start () {
var pointA = transform.position;
var pointB = transform.position + Vector3(0, amount, 0);
while (true) {
yield MoveObject(transform, pointA, pointB, speed);
yield MoveObject(transform, pointB, pointA, speed);
}
    }
   
    function MoveObject (thisTransform : Transform, startPos : Vector3, endPos : Vector3, time : float) {
var i = 0.0;
var rate = 1.0/time;
while (i < 1.0) {
i += Time.deltaTime * rate;
thisTransform.position = Vector3.Lerp(startPos, endPos, i);
yield;
}
    }


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