Dont destroy on load

Attach this to an object to keep it during scene loading.

public class DontDestroyOnLoad : MonoBehaviour
{
    private void Awake()
    {
        DontDestroyOnLoad(gameObject);
    }
}