Version:

IN THIS ARTICLE

Find Sub-Material

Find Sub-Material

Finds and returns the submaterial with the specified name and submaterial ID.

Lumberyard has two types of material assets:

  • Materials – A basic single item that represents one material.
  • Multimaterials – A material that contains multiple submaterials inside it.

You can use the Find Sub-Material node to access a submaterial that is inside a multimaterial. To access the submaterial, specify the name of the multimaterial and the ID of one of its submaterials. Material IDs range from the number of available submaterials. For example, if a multimaterial has five submaterials, you can specify a value from 1 to5.

To access a single material, you can use the Find by Name node.

Contents

[findsubmaterial, findsubmaterial, findsubmaterialnode, findchildmaterial]

Inputs


PinTypeDescription
InEventTriggers the node.
Material NameStringThe path name of the material to find. The material must be a multimaterial. For more information, see Finding the Material Name.
Material IDNumberID of the submaterial in the multimaterial. IDs start at 1.
Should LoadBooleanIf true, the submaterial is loaded if it is not already available.

Outputs


PinTypeDescription
OutEventSends when the node is finished.
MaterialMaterialThe submaterial that is found. Returns Invalid if the submaterial is not found.