AdaptiveSkyboxScaler
is a Unity component designed to scale skybox textures proportionally to fit any screen format or platform. This is particularly useful for projects with numerous scenes and different skyboxes, ensuring a consistent and correct display across various devices.
- Automatically scales skybox textures to maintain correct aspect ratios.
- Easily integrates with existing projects with minimal setup.
- Optimized to cache components and minimize performance impact.
- Copy the
AdaptiveSkyboxScaler
script into your Unity project. - Attach the script to the main camera or any other appropriate game object.
- Assign a
SpriteRenderer
component to thebackgroundSpriteRenderer
field in the inspector.
- Ensure each scene has a skybox assigned in the
RenderSettings
. - The script will automatically find the main camera and skybox texture.
- It will create a sprite from the skybox texture and assign it to the
SpriteRenderer
. - The script will scale the sprite to fit the screen size proportionally.
- Add the ability to install a camera if I do not use the “MainCamera” tag system.
- Add a mode for automatically creating SpriteRenderer settings and installations without specifying your own SpriteRenderer.
This project is licensed under the MIT License - see the LICENSE file for details.