Editor Scripting API
    • Creates a material from a shader graph asset.

      Parameters

      • assetManager: AssetManager

        The asset manager used to create the material.

      • graphType: ShaderGraphType

        The type of the shader graph asset.

      • OptionalmaterialDir: string

        The directory where the material will be created. Default is an empty string.

      • OptionalmaterialName: string

        The name of the material. Default is 'new material'.

      • OptionalshaderGraphDir: string

        The directory of the shader graph asset. Default is an empty string.

      Returns Promise<{ material: Material; passInfo: PassInfo; shaderGraphAsset: Pass }>

      An object containing the created material asset, the shader graph asset, and the pass on the material.

    MMNEPVFCICPMFPCPTTAAATR