which method runs on scene change in unity code example
Example: unity scene change
using UnityEngine.SceneManagement;
SceneManager.LoadScene("YourSceneName");
using UnityEngine.SceneManagement;
SceneManager.LoadScene("YourSceneName");