I’m trying to make it so where if there is no more objects in my scene it loads the next scene
but when all the objects are gone it still doesn’t load the scene! Please help.
public class next : MonoBehaviour
// Start is called before the first frame update
// Update is called once per frame
This code shouldn’t even compile, you don’t have a if statement before the else one, also you should test the length of the array returned by FindGameObjectsWithTag, the way you do it right now is just searching for the GameObjects but not doing anything with the returned data…
if (GameObject.FindGameObjectsWithTag("Page").Length > 0)
EDIT: You also need to put this code in Update and not in Start so the test is executed once per frame. BUT be aware that the performance will be poor, it’s not recommended to use it every frame. You should better manage your objects using a List or an array and removing the objects from that list when deleting them, and testing the list item number instead of searching the entire scene for objects.