Switching Skyboxes with the Script Canvas Editor
Switching Skyboxes with the Script Canvas Editor
You can use the Script Canvas editor to create a script that switches the skybox material .
To switch skyboxes with a script
In Lumberyard Editor, choose Tools, Script Canvas.
In the Script Canvas editor, choose File, New Script.
Right-click the canvas, search and then select the following nodes:
- On Graph Start
- Load by Name
- Set Skybox Material
For your script, do the following:
Select the Out pin for On Graph Start and drag to connect it to the In pin for Load By Name.
For the Material Name parameter, specify the path to the material to use for the skybox. For more information, see Finding the Material Name.
Select the Out pin for Load By Name and drag to connect it to the In pin for Set Skybox Material.
Select the Material pin for Load By Name and drag to connect it to the Material pin for Set Skybox Material.
Example
Save the script and attach it to an entity with the Script Canvas component.
Close the Script Canvas editor.