Doors Spawn Entities / Skip Rooms Script | | Past...

Hope this helps!

// Function to skip room void SkipRoom() // Load next room GameObject.Find("RoomManager").GetComponent<RoomManager>().LoadNextRoom(roomToSkip); Doors Spawn Entities / Skip Rooms Script | Past...

// Entity to spawn when door is opened public GameObject entityToSpawn; Hope this helps

void Update() // Check if door is opened if (isDoorOpened) // Spawn entity or skip room if (entityToSpawn != null) SpawnEntity(); else if (roomToSkip != null) SkipRoom(); else if (roomToSkip != null) SkipRoom()

// Function to close door public void CloseDoor() isDoorOpened = false;