レンダー設定
タグとレイヤー

スクリプト実行順設定

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

通常,異なるスクリプトのAwake,OnEnable,Update関数はロード順に処理されてしまいます(すなわちランダム)。そこでScript Execution Order (スクリプト実行順)設定により明示的に順序を変更できます。

スクリプトをInspector通して追加するには「+」ボタンを押下し,スクリプトをドラッグすることで実行順を変更できます。スクリプトをDefault Time(デフォルト時間)の上下に配置することが可能であり,上に配置した場合はデフォルト時間よりも早く実行され,下に配置した場合はデフォルト時間より遅れて実行される。ダイアログの上から下の順序でスクリプトは実行されます。表示されていないスクリプトはデフォルト時間で実行され,各々の順序はランダムとなります。

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.

レンダー設定
タグとレイヤー