- Home /
Scene is loading/not loaded
My scene continuously says is loading and not loaded and I can not play properly (see images). I don't get any error message or warning. I don't know if there is an error in the code (if yes, I don't know which part to import here because it is too long), I don't think this is a common thing because I couldn't find anything in the forums. If there is a way to fix it please help. It was working fine till I added this to
Update()
function:
if (health <= 0)
{
RestartGame();
}
And added this to void OnControllerColliderHit (ControllerColliderHit c)
if (c.gameObject.tag == "enemy")
{
AudioSource audio1 = GetComponent<AudioSource>();
audio1.PlayOneShot(hurt);
health -= 25;
}
I had this before :
void RestartGame()
{
StartCoroutine(Wait3secs());
Application.LoadLevel(Application.loadedLevel);
}
@unity_JaL6pRCgCNL_cQ is Jason Weimann the yt channel?
@rawa800x, yes it is the Jason Weimann youtube channel only.
Though I wasn't able to solve this "(Not loaded)", I have found a solution to my problem.
Answer by fuadshahmuradov · Dec 20, 2019 at 02:30 PM
Found the answer. I had health = 0;
in Start()
function. So it was Restarting game repeatedly. I changed it to health = 50;
Ahhhhh I was trying to figure this out in project for like three days and thought it was something to do with my $$anonymous$$enu$$anonymous$$anager script. This helped so much for something being so simple!
Im walking the same tutorial and facing the same problem now. Did you solve yours?
@mohosinmahmud9602 i just restarted it but then i found out he made a new video on it about a week ag. Now im working on that. I also believe that it was always in the restart position...
@rawa800x , same. Even i am making angry birds game and i'm getting the same error.
I am not understanding what's wrong in the code...
@unity_JaL6pRCgCNL_cQ I've followed a different tutorial from the same guy (its for bird as well) and I've completed it. lucky for us it doesn't have that thing he did to reset he used a better way that wont involve worrying about your position.
Answer by xdzeroalias · Dec 09, 2020 at 01:38 PM
In my case it was a boolean value that was initialized before start().I initialized the value inside the start function and it solved my problem.
Your answer
![](https://koobas.hobune.stream/wayback/20220612220430im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Problem changing string value. 2 Answers
Multiple AR tracker not working. 0 Answers
no errors but not working The one who answers, i give him 2 reputation points 4 Answers
How Do I Make My Player Fall Through? 1 Answer
Rotation of player occurs continuously when on the left side of the screen 1 Answer