public static void LoadSceneById(int id, bool force = false)
{
if (id >= GetSceneCount())
{
throw new Exception("Scene Index outisde of Range");
}
int index = 1 + id;
Scene scene = SCM.GetSceneByBuildIndex(index);
if (force)
{
if (!scene.isLoaded)
{
SCM.LoadScene(index);
}
else
{
SCM.LoadScene(scene.name);
}
}
else
if (!scene.isLoaded)
{
SCM.LoadSceneAsync(index);
}
else
{
SCM.LoadSceneAsync(scene.name);
}
}