ScreenPointToRay issue

My project’s clickable items (gameObjects, using ScreenPointToRay), when built, are only clickable on the developing computer, a MacBook G5, not on my stationary, an iMac G5.
Anyone have a clue as to why?
I can select them via clicking on them, and it works fine in unity and on the build made on the same computer, but when I move the build over the network to my stationary to try it out on a bigger screen, I can’t select stuff anymore.

Can you post your code?

It’s really simple.

if (Input.GetButtonDown(“Fire1”))
{var hit : RaycastHit;
var ray = Camera.main.ScreenPointToRay (Input.mousePosition);
if (Physics.Raycast(ray, hit, 1000, layerMask)
{etc…

Is a different resolution or aspect ratio changing things? Do you have to use raycasts? OnMouseDown() would probably be easier. It might change things enough to work, or not. I don’t know what your situation is.

Can you use OnMouseDown on gameObjects? That would certainly do it. They have boxColliders. I should try it out.

You can definitely use OnMouseDown on anything with a collider. I’ve tried quite a few myself.

Yup. It works like a charm. Thanks a bundance.
You wouldn’t happen to have an effective way of aligning GUITextures so they don’t move around when the screen is resized, would ya?

Instead of GUITextures I use planes with textures on them/3d text objects, and then align them in front of the camera and make them children. That way they get resized along with screen resolution and they stay aligned correctly.