x


list of pre defined functions like Update and OnTriggerEnter to use

There are many words that are placed after function javascript. Examples: OnCollisionEnter, OnMouseUp, Update. Could someone make a list of all of them? I know that there can be endless amounts when you use other parts such as BroadcastMessage("someWord"). But I just want to know all the common ones to know if I'm missing some of them. If there is a link to a list just send that. The reason I'm asking this question is because I haven't been able to find them on the scripting reference page. Thanks.

more ▼

asked Jul 30 '10 at 04:59 PM

0V3RWR173D gravatar image

0V3RWR173D
190 10 11 25

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

2 answers: sort voted first

Here are the main runtime ones (under Overridable Functions):

http://unity3d.com/support/documentation/ScriptReference/MonoBehaviour.html

more ▼

answered Jul 30 '10 at 05:00 PM

Mike 3 gravatar image

Mike 3
30.7k 10 67 255

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

those functions are defined in Monobehaviour class. you override them to create new functionality. those functions are not virtual and unity uses reflection to call them and see if they exist or not.

more ▼

answered Jul 30 '10 at 06:09 PM

Ashkan_gc gravatar image

Ashkan_gc
9.3k 33 56 120

i know that this info might not be important for the questioner but others will read this too.

Jul 30 '10 at 06:09 PM Ashkan_gc

indeed... and I am finding out that reflection is one progammer's best friend. (1 point up!) Thank you.

Oct 16 '10 at 08:26 PM dingben
(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:

x5273
x3570
x498
x382

asked: Jul 30 '10 at 04:59 PM

Seen: 3862 times

Last Updated: Jul 30 '10 at 06:10 PM