Rooms

Overview

The Rooms extension allows you to define rectangular areas within your scene that work as numeric boundaries. Each room can have different sizes and transition settings, resulting in a very wide range with possible configurations.
With this extension you can easily recreate the old Zelda style linear room transitions, or something more modern and fluid like Limbo.

Editor

Parameters:

Rooms: This is a list of all rooms. You can add and remove them using the buttons on the bottom-right corner

Update Interval (>0): For performance reasons the room detection is only tested at a fixed interval. This value represents that interval. Adjust it to fit your needs

Use Targets Mid Point: If enabled, the extension will use the camera targets mid point to know when to activate. If not, you can pass it a GameObject reference that the extension will use instead

Transition Instantly on Start: If enabled and the camera target is inside a room once the level starts, the extension will instantly transition to that room

Restore on Room Exit: If enabled, the camera will reset to the level start settings once the target is not inside any room

Automatic Room Activation: If enabled, the extension will automatically detect when the camera target is inside a room. If you want more control, disable this option and take care of the detection and activation of the rooms manually, using the extension API

OnStartedTransition: Event that fires once the camera starts transitioning to a new room

OnFinishedTransition: Event that fires once the camera finishes transitioning to a new room

Room Parameters:

Dimensions: This is the Rect that represents the room size and position. Feel free to adjust it manually or use the handles on the Scene View

Ease Type: The animation type of the transition

Duration: How long it takes to change to the new room

Scale To Fit: If enabled, the camera will resize to best fit the room size. Notice that the camera will always resize to fit a room if the room is smaller than the current camera size

Zoom: If enabled, the camera will resize using the scale defined. This value is relative to the initial camera size