redresh scenes unity code example
Example 1: how to load the active scene unity
using UnityEngine.SceneManagement;
using UnityEngine;
public class PlayerMovement : MonoBehaviour
{
void LoadScene()
{
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
}
}
Example 2: unity how to reload a scene
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);