x


Adding script to game object

Hey All, Very new to Unity. Maya, Cinama4D, everything 3d, I'm a pro. But scripting I suck. Programming? I wont even go there. That being said, I'm trying to make a very simple car game for iPhone. I'm using the NumberRacer project as a template. Using the scripts basically. So, I import all of my scene data from Maya. Cool. No problem. Then I try and attach a script and I get "Can't add script behaviour JCar. You need to fix all compile errors in all scripts first!" I seriously have no idea what to do here! Any suggestions? Thanks!

more ▼

asked Mar 12 '10 at 12:22 AM

Stan gravatar image

Stan
13 1 1 3

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

What script are you trying to attach? Unity inspects all your scripts before you add them and again every time you make a change to them to ensure that you haven't made a mistake.

There is likely a bug in the script that is upsetting Unity.

A simple way to test this would be to comment out as much unnecessary code as possible. If you post your script, I'm sure someone could help you find the bug.

more ▼

answered Mar 12 '10 at 12:49 AM

Michael La Voie gravatar image

Michael La Voie
2.3k 7 12 43

Thanks Michael!! I just figured it out. It seems I had a few extra lines in there. Removed those and then it worked.

Mar 12 '10 at 12:59 AM Stan

Not a problem. If you liked the answer, please vote it up and mark it as correct.

Mar 12 '10 at 01:25 AM Michael La Voie
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3329
x2086

asked: Mar 12 '10 at 12:22 AM

Seen: 3071 times

Last Updated: Jun 20 '10 at 02:18 PM