Script ExecutionOrder

The image below shows that the Execution Order can be set scripts if there's a dependency relationship such that the script's order of execution impacts the scene logic.

The EndSceneConsequences are shown as having its' logic executed before the default time when other scripts have their code executed. This is because the data for the CatState and MonsterState are configured in this script, so the NPCActivation must be executed after this script so those gameObject's visibility is determined at the beginning of the scene.

Hide_Show_Panel executed before DialogManager, because logic has been added to DialogManager version2 to open the finalPanelToOpen if there are no conversations left to be executed.

To Set the Script Execution Order, Select the Hide_Show Panel Script in your assets, then in the Inspector, select the option at the top: ExecutionOrder. When you have the ScriptExecution Order open in the ProjectSettings, Drag the Hide_Show_Panel script and the DialogManager scripts into the panel and make sure that the Hide_Show_Panel script gets executed first....so that the logic in the DialogManager...to show the LastPanelToShow is executed last.

Last updated