scenemanager levelname range (level number 400,800)


if (SceneManager.GetActiveScene().name() == (RandomRange(50,100))){
score +1;
} else if (SceneManager.GetActiveScene().name() == (RandomRange(101,200))){
score +2;
what kind of way do I need to follow.
this code is incorrect :frowning:

I want to detect the different level range

  • First of all : not name().
  • What does RandomRange() method? Is it Random.Range()? If so, the name of a scene is a string value while Random.Range is an integer, you can’t compare them.
  • When you say this code is incorrect? I guess it does not compile (my 1st point) but is there something else you re talking about?