Here is a link to my TUT http://www.youtube.com/watch?v=WyjAKGqMwkM&feature=c4-overview&list=UUZ5ZqniO2wvv3Z7Jnm2G-yQ
@second 20 he puts the Prefab into the script, but I don’t have two scripts to put stuff in. I can’t put the Grass prefab into the building script. He puts it in the bottom right of the screen and adds his Prefab to his script, but I can’t, I don’t have the option he has. I think he is using Unity 3.5, but I’m using the latest version.
Here is my code
using UnityEngine;
using System.Collections;
public class BuildScript : MonoBehaviour {
RaycastHit hit;
public Transform prefab;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
Ray ray = camera.ViewportPointToRay (new Vector3 (0.5F, 0.5F, 0));
if(Physics.Raycast(ray, out hit)){
if(Input.GetMouseButtonDown(0)){
Destroy(hit.collider.gameObject);
print(“You Removed The Block :)<3”);
}
}
}
}
Please help someone!

