Scene Room Loader

This class allows the game to transition between different rooms and handles the loading and unloading of those rooms. Additionally, it synchronizes room transitions by calling the specified actions when these operations are completed.

  1. public void LoadRoom(Room room, RoomInfo roomInfo, Action onLoaded)
    • method performs the loading of a room. This method takes the Room object, RoomInfo information, and an Action to call when the installation is complete. First, the specified scene is loaded using the ReflectiveSceneManager.LoadScene method. When loading is complete, the specified onLoaded action is called. Additionally, the reference to the loaded scene is assigned to the room.Scene field.

  2. public void UnLoadRoom(Room room)
    • method performs the removal of a room. This method removes the specified scene using the ReflectiveSceneManager.UnLoadScene method.

Last updated