in unity 2d how to call another script from another script in a different scene code example
Example: how to reference scripts in other scenes unity
//you can use this to preserve scripts when loading new scene
DontDestroyOnLoad();
//you can use this to preserve scripts when loading new scene
DontDestroyOnLoad();