Variables not showing in Inspector
This is all I have at the moment - just the variables - everything that I'm (badly) working on is commented out and the variables still don't show in the inspector. There's no error messages coming up for any of the scripts used in the application I'm creating.
I currently can not select Bullet or a camera in the inspector. Any reason why?
function Update () {
var hit: RaycastHit;
var camera : Camera;
var ray: Ray = camera.ScreenPointToRay(Input.mousePosition);
var Bullet: GameObject;
//if (Physics.Raycast(ray, hit)) {
// var objectHit: Transform = hit.transform;
// var cube = GameObject.CreatePrimitive(PrimitiveType.Cube);
// cube.AddComponent.<Rigidbody>();
// Instantiate(cube, ray.origin, Quaternion.identity);
//}
}
Comment
Answer by Wolfshadow · Aug 27, 2015 at 12:41 AM
The variable needs to be public. Do public Bullet: Gameobject;