- Home /
,Restart Scene after level Completion
Hello, everyone! I developed a jigsaw puzzle game and almost complete but there is one problem when I complete the level, the completion panel showing automatically which I set in C sharp script and I want this but the problem is, it's not working when I restart that level or trying to close the completion panel to start the level again. It's working when I restart the game.
Note: I assigned the level complete script to all pieces of the puzzle which is:
using System.Collections; using System.Collections.Generic; using UnityEngine;
public class MexicoGM : MonoBehaviour { public static int remainingPieces = 4;
public GameObject Complete;
void Update()
{
if (remainingPieces == 0)
{
Complete.gameObject.SetActive(true);
}
}
},Hello, everyone! I developed a jigsaw puzzle game and almost complete but there is one problem when I complete the level, the completion panel showing automatically which I set in C sharp script and I want this but the problem is, it's not working when I restart that level or trying to close the completion panel to start the level again. It's working when I restart the game.
Note: I assigned the level complete script to all pieces of the puzzle which is:
public class CompleteLevel : MonoBehaviour { public static int remainingPieces = 4;
public GameObject Complete;
void Update()
{
if (remainingPieces == 0)
{
Complete.gameObject.SetActive(true);
}
}
}
I think I need to add something here to restart the game once it complete by the user.
Please Help.
Your answer
Follow this Question
Related Questions
scene won't reset after restart 1 Answer
How to create a loading screen at the beginning? Load asynchronous not working 0 Answers
Game freezes loading a new scene with Android split application (APK + OBB) 1 Answer
Do we need pro version for loading progress in unity 5 ? 0 Answers
Reset Lives Object 0 Answers