The SkyTexture
property of the SkyBox2D
class represents the texture used for rendering the 2D skybox in the scene. This property allows you to specify a Texture
object that will be applied to the skybox, providing the visual appearance of the sky.
To use the SkyTexture
property, you need to have an instance of the SkyBox2D
component. You can then set the SkyTexture
property to a Texture
object that you want to use for the skybox.
Example usage:
var skybox = new SkyBox2D();
var texture = Texture.Load("path/to/your/texture.png");
skybox.SkyTexture = texture;
This will apply the specified texture to the skybox, rendering it in the scene.