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 again or trying to close the completion panel to start the level again. It works when I restart the game.
I assign the Level Complete script to all pieces of the puzzle, which is:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LevelComplete : MonoBehaviour
{
public static int remainingPieces = 4;
public GameObject Complete;
void Update()
{
if (remainingPieces == 0)
{
Complete.gameObject.SetActive(true);
}
}
}
Please help!