If Statement & checking current scene.
If I am the object named Player and I collide with the exit point he moves to the next scene, The issue I am having is lack of knowledge.
I want to say If I am on the current scene and I am the the player object then I can move to the next scene. so that I have to be on a certain scene before I transition to the next. How do I refer to the current scene in this scenario?
The part of of my script I need help with..
if(Colider.gameObject.name == "Player"); //checking for name
{
SceneManager.LoadScene ("02"); //The scene I am loading
}
Sorry if I am not being clear with my issue,
Answer by RobertoLangarica · Mar 15, 2016 at 10:20 PM
The manual is your friend, check the SceneManager you could ask for the activeScene and with the Scene object you could check the name.
Thank you for the link to the area of the manual I will need.
Your answer
Follow this Question
Related Questions
Playerprefs are not deleting when an apk is uninstalled? 0 Answers
Getting weird error message!?!?!? 1 Answer
Is there any way to increase score with UI when I destroy an object? 0 Answers
on collision code doesnt work. pls help error CS8025: Parsing error 1 Answer
Mulit script variable not connecting 0 Answers