Check out example codes for "unity editor on scene change". It will help you in understanding the concepts better.

Code Example 1

//Unity haven't callback for editor, but you can use this code.

[ExecuteInEditMode]
public class SceneScript : MonoBehaviour {
 
 	//On scene change it will be reseted to false
    bool HasRunOnce = false;
 
    void Update () {
        if (HasRunOnce == false) {
        	//First update after scene changed
            Debug.Log ("One this once.");
            HasRunOnce = true;
        }
    }
}

Learn ReactJs, React Native from akashmittal.com