Lumberyard
User Guide (Version 1.16)

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

  1. In Lumberyard Editor, choose Tools, Script Canvas.

  2. In the Script Canvas editor, choose File, New Script.

  3. Right-click the canvas, search and then select the following nodes:

  4. For your script, do the following:

    1. Select the Out pin for On Graph Start and drag to connect it to the In pin for Load By Name.

    2. For the Material Name parameter, specify the path to the material to use for the skybox. For more information, see Finding the Material Name.

    3. Select the Out pin for Load By Name and drag to connect it to the In pin for Set Skybox Material.

    4. Select the Material pin for Load By Name and drag to connect it to the Material pin for Set Skybox Material.

    Example

    
                        Switch the skybox material with the
                                Script Canvas editor.
  5. Save the script and attach it to an entity with the Script Canvas component.

  6. Close the Script Canvas editor.