Drag is not changing after scene reload

Hello,

My goal is to slow the object i.e. to increase a drag after the scene reload. I have attached following function to my button and scene change is working very well but drag is not changing. I would appreciate any suggestions.

public void Otpor()
    {
        SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
        GetComponent<Rigidbody>().drag = 15;
    }

This is not physics, it’s about scene reloading and how/when you can modify objects in the loaded scene. Take a look at the docs for SceneManager.LoadScene where it states “When using SceneManager.LoadScene, the scene loads in the next frame, that is it does not load immediately.”.

Logically though, even if it somehow did load it synchronously, the following “GetComponent” call wouldn’t work because the object you’re referring to would be destroyed already and replaced by a new one you loaded unless of course this object is set to be DoNotDestroyOnLoad.