Version: 2018.3 (switch to 2019.1 )
Editor
Preset Manager
Other Versions

Script Execution Order

See documentation on the execution order of event functions to learn how Unity handles event functions by default.

You can use the Script Execution Order settings (menu: Edit > Project Settings, then select the Script Execution Order__ category).

Scripts can be added to the inspectorA Unity window that displays information about the currently selected GameObject, Asset or Project Settings, alowing you to inspect and edit the values. More info
See in Glossary
using the Plus “+” button and dragged to change their relative order. Note that it is possible to drag a script either above or below the Default Time bar; those above will execute ahead of the default time while those below will execute after. The ordering of scriptsA piece of code that allows you to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you like. More info
See in Glossary
in the dialog from top to bottom determines their execution order. All scripts not in the dialog execute in the default time slot in arbitrary order.

The numbers shown for each script are the values the scripts are actually ordered by. When a script is dragged to a new position, the number for the script is automatically changed accordingly. When a number is changed, either manually or automatically, it changes the meta file for that script. For this reason it’s best if as few of the numbers as possible change when the order is changed. This is why, when possible, only the script that is dragged has its number changed, rather than assigning new numbers to all the scripts.

Did you find this page useful? Please give it a rating:

Editor
Preset Manager