x


Passing a string from Javascript to C#

Is it possible to tell a C# script to get.Component (a javascript) and then perform a function depending on a string's value from the javascript? I understand that the javascript would have to compile first, thus putting it in the correct place but is there anything else I would have to consider?

more ▼

asked Jul 14 '10 at 10:22 AM

Graeme gravatar image

Graeme
53 9 9 15

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

1 answer: sort voted first

No, you've pretty much got it - you put it in an earlier compilation pass folder (plugins/standard assets) and it should just work as if it were c# itself

more ▼

answered Jul 14 '10 at 10:25 AM

Mike 3 gravatar image

Mike 3
30.6k 10 67 254

Thanks! Just wanted to check it will work before I start doing anything.

Jul 14 '10 at 10:58 AM Graeme
(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:

x3568
x3418
x422
x61

asked: Jul 14 '10 at 10:22 AM

Seen: 3174 times

Last Updated: Jul 14 '10 at 10:22 AM