docs.unity3d.com
Version: 

    Class MaterialInterface

    Inheritance
    object
    Interface
    MaterialInterface
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Pixyz.Material
    Syntax
    public class MaterialInterface : Interface

    Methods

    AddImageChangedCallback(ImageChangedDelegate, IntPtr)

    Declaration
    public uint AddImageChangedCallback(MaterialInterface.ImageChangedDelegate callback, IntPtr userData)
    Parameters
    Type Name Description
    MaterialInterface.ImageChangedDelegate callback
    IntPtr userData
    Returns
    Type Description
    uint

    AddMaterialChangedCallback(MaterialChangedDelegate, IntPtr)

    Declaration
    public uint AddMaterialChangedCallback(MaterialInterface.MaterialChangedDelegate callback, IntPtr userData)
    Parameters
    Type Name Description
    MaterialInterface.MaterialChangedDelegate callback
    IntPtr userData
    Returns
    Type Description
    uint

    AddUniformProperty(uint, string, ShaderUniformType)

    Add a shader uniform parameter to the given custom pattern

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public void AddUniformProperty(uint pattern, string name, ShaderUniformType type)
    Parameters
    Type Name Description
    uint pattern

    The custom pattern to edit

    string name

    Name of the new property

    ShaderUniformType type

    Type of the new uniform

    AreOpaques(MaterialList)

    Check if some materials are opaques. Function will return 'False' for each material if:\n- The 'Opacity' Coeff is not 1.0\n- The 'Opacity' property is a Texture\n- The 'Albedo' property is a Texture and at least one pixel of the texture has an alpha value

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public BoolList AreOpaques(MaterialList materials)
    Parameters
    Type Name Description
    MaterialList materials

    Materials to check opacity

    Returns
    Type Description
    BoolList

    ClearAllMaterials()

    Remove and delete all the materials

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public void ClearAllMaterials()

    ConfigureFunctionLogger(string, bool, bool, bool)

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public void ConfigureFunctionLogger(string functionName, bool enableFunction, bool enableParameters, bool enableExecutionTime)
    Parameters
    Type Name Description
    string functionName
    bool enableFunction
    bool enableParameters
    bool enableExecutionTime

    ConvertFloat32To8BitsImage(uint, double, double)

    Returns a new image from the given converter from 32bits float to a 8Bits (e.g. depth render map)

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public uint ConvertFloat32To8BitsImage(uint image32F, double minValue = -1, double maxValue = 1)
    Parameters
    Type Name Description
    uint image32F

    Image to convert

    double minValue

    Minimal value of the floats (will be 0 in 8bits)

    double maxValue

    Minimal value of the floats (will be 255 in 8bits)

    Returns
    Type Description
    uint

    ConvertHeightMapToNormalMap(uint, double)

    Convert a height map to a normal map

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public uint ConvertHeightMapToNormalMap(uint hmap, double height = 0.5)
    Parameters
    Type Name Description
    uint hmap

    Height map reference

    double height

    Maximum height

    Returns
    Type Description
    uint

    CopyMaterial(uint, bool)

    copies a material

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public uint CopyMaterial(uint toCopy, bool addToMaterialLibrary)
    Parameters
    Type Name Description
    uint toCopy

    Material to copy

    bool addToMaterialLibrary

    Add to material library

    Returns
    Type Description
    uint

    CreateCustomMaterialPattern(string)

    Create a new custom material pattern

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public uint CreateCustomMaterialPattern(string name)
    Parameters
    Type Name Description
    string name

    Name of the pattern

    Returns
    Type Description
    uint

    CreateImageFromData(ByteList, string)

    Import an Image from only its data

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public uint CreateImageFromData(ByteList data, string name = "img")
    Parameters
    Type Name Description
    ByteList data

    The raw data as input

    string name

    If need of a name

    Returns
    Type Description
    uint

    CreateImageFromDefinition(ImageDefinition)

    Import an image from its raw data

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public uint CreateImageFromDefinition(ImageDefinition imageDefinition)
    Parameters
    Type Name Description
    ImageDefinition imageDefinition

    The image definition

    Returns
    Type Description
    uint

    CreateImagesFromDefinitions(ImageDefinitionList)

    Import images from their raw data

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public ImageList CreateImagesFromDefinitions(ImageDefinitionList imageDefinitions)
    Parameters
    Type Name Description
    ImageDefinitionList imageDefinitions

    The image definitions

    Returns
    Type Description
    ImageList

    CreateMaterial(string, string, bool)

    Create a new material from pattern

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public uint CreateMaterial(string name, string pattern, bool addToMaterialLibrary = true)
    Parameters
    Type Name Description
    string name

    Name of the material

    string pattern

    Name of the pattern

    bool addToMaterialLibrary

    Name of the pattern

    Returns
    Type Description
    uint

    CreateMaterialFromDefinition(MaterialDefinition)

    Create PBR material from a material definition

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public uint CreateMaterialFromDefinition(MaterialDefinition materialDefinition)
    Parameters
    Type Name Description
    MaterialDefinition materialDefinition

    The structure containing all the PBR material information

    Returns
    Type Description
    uint

    CreateMaterialsFromDefinitions(MaterialDefinitionList)

    Create PBR materials from material definitions

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public MaterialList CreateMaterialsFromDefinitions(MaterialDefinitionList materialDefinitions)
    Parameters
    Type Name Description
    MaterialDefinitionList materialDefinitions

    Material definitions containing properties for each given material

    Returns
    Type Description
    MaterialList

    CreateMaterialsFromMaps(string)

    Automatically creates PBR materials when importing PBR texture maps from a folder

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public MaterialFromMapsReturn CreateMaterialsFromMaps(string directory)
    Parameters
    Type Name Description
    string directory

    Directory path

    Returns
    Type Description
    MaterialFromMapsReturn

    ExportImage(uint, string)

    Export an image

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public void ExportImage(uint image, string filename)
    Parameters
    Type Name Description
    uint image

    Identifier of the image to export

    string filename

    Filename of the file to export

    FillUnusedPixels(uint, ColorAlpha)

    Fill unused pixels by propagating and averaging used pixels

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public uint FillUnusedPixels(uint image, ColorAlpha unusedColor)
    Parameters
    Type Name Description
    uint image

    Image to process

    ColorAlpha unusedColor

    Color used to identify unused pixels

    Returns
    Type Description
    uint

    FilterAO(uint, uint, double, double, double, int, bool, double)

    Filter an AO map using ATrous method

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public uint FilterAO(uint aoMap, uint normalMap, double sigmaPos = 10, double sigmaValue = 0.1, double sigmaNormal = 0.01, int levelCount = 4, bool filterLowValues = true, double lowValueThreshold = 0.01)
    Parameters
    Type Name Description
    uint aoMap

    Input AO Map (the alpha component must be set to 0 for unused pixels)

    uint normalMap

    Input Normal Map (preferable to use a World space normal map, but an Object space normal map can be used)

    double sigmaPos

    ATrous Sigma pos

    double sigmaValue

    ATrous Sigma value

    double sigmaNormal

    ATrous Sigma normal

    int levelCount

    Atrous #Levels

    bool filterLowValues

    Remove low values from the filtering (see: lowValuesThreshold parameter)

    double lowValueThreshold

    Threshold used if filterLowValues is enabled

    Returns
    Type Description
    uint

    FindCustomMaterialPatternByName(string)

    Returns the material pattern which has the given name

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public uint FindCustomMaterialPatternByName(string name)
    Parameters
    Type Name Description
    string name

    The name of the material pattern

    Returns
    Type Description
    uint

    FindMaterialsByPattern(string)

    Returns all materials using the given pattern

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public MaterialList FindMaterialsByPattern(string pattern)
    Parameters
    Type Name Description
    string pattern

    A material pattern

    Returns
    Type Description
    MaterialList

    FindMaterialsByProperty(string, string, bool)

    Returns all materials which match a given property value

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public MaterialList FindMaterialsByProperty(string propertyName, string propertyValue, bool caseInsensitive = false)
    Parameters
    Type Name Description
    string propertyName

    Name of the property to match

    string propertyValue

    Regular expression to match for the property value

    bool caseInsensitive

    If True, the regex will be insensitive to upper and lower cases

    Returns
    Type Description
    MaterialList

    GetAllImages(MaterialList)

    Returns all the images loaded in the current session or from a list of materials

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public ImageList GetAllImages(MaterialList materials = null)
    Parameters
    Type Name Description
    MaterialList materials

    Materials to retrieve the images from (returns all images loaded in the current session if empty)

    Returns
    Type Description
    ImageList

    GetAllMaterialPatterns()

    Returns all the material patterns in the current session

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public StringList GetAllMaterialPatterns()
    Returns
    Type Description
    StringList

    GetAllMaterials()

    Retrieve the list of all the materials in the material library

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public MaterialList GetAllMaterials()
    Returns
    Type Description
    MaterialList

    GetColorMaterialInfos(uint)

    Get color material properties

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public ColorMaterialInfos GetColorMaterialInfos(uint material)
    Parameters
    Type Name Description
    uint material

    The material to get properties

    Returns
    Type Description
    ColorMaterialInfos

    GetCustomMaterialPattern(uint)

    Returns the custom material pattern associated to the custom material

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public uint GetCustomMaterialPattern(uint material)
    Parameters
    Type Name Description
    uint material

    Custom material to get the pattern from

    Returns
    Type Description
    uint

    GetExportImageFormats()

    Returns image format names and extensions which can be exported in Pixyz

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public FormatList GetExportImageFormats()
    Returns
    Type Description
    FormatList

    GetImageDefinition(uint)

    Returns the raw data of an image

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public ImageDefinition GetImageDefinition(uint image)
    Parameters
    Type Name Description
    uint image

    Image's definition

    Returns
    Type Description
    ImageDefinition

    GetImageDefinitions(ImageList)

    Returns the raw data of a set of images

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public ImageDefinitionList GetImageDefinitions(ImageList images)
    Parameters
    Type Name Description
    ImageList images

    The images

    Returns
    Type Description
    ImageDefinitionList

    GetImagePixelColor(uint, int, int)

    Returns the color of a given pixel in an image

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public ColorAlpha GetImagePixelColor(uint image, int x, int y)
    Parameters
    Type Name Description
    uint image

    The image to get the pixel from

    int x

    The x pixel coordinates

    int y

    The y pixel coordinates

    Returns
    Type Description
    ColorAlpha

    GetImageSize(uint)

    Returns the size of an image

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public GetImageSizeReturn GetImageSize(uint image)
    Parameters
    Type Name Description
    uint image

    The image to get the size from

    Returns
    Type Description
    GetImageSizeReturn

    GetImagesSizes(ImageList)

    Returns the sizes of multiple images

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public GetImagesSizesReturn GetImagesSizes(ImageList images)
    Parameters
    Type Name Description
    ImageList images

    The image to get the size from

    Returns
    Type Description
    GetImagesSizesReturn

    GetImportImageFormats()

    Returns the image format names and extensions which can be imported in Pixyz

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public FormatList GetImportImageFormats()
    Returns
    Type Description
    FormatList

    GetImpostorMaterialInfos(uint)

    Get impostor texture material properties

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public ImpostorMaterialInfos GetImpostorMaterialInfos(uint material)
    Parameters
    Type Name Description
    uint material

    The material to get properties

    Returns
    Type Description
    ImpostorMaterialInfos

    GetLastError()

    Declaration
    public static string GetLastError()
    Returns
    Type Description
    string

    GetMaterialDefinition(uint)

    Returns the properties of a PBR Material

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public MaterialDefinition GetMaterialDefinition(uint material)
    Parameters
    Type Name Description
    uint material

    The PBR Material

    Returns
    Type Description
    MaterialDefinition

    GetMaterialDefinitions(MaterialList)

    Returns the properties of a set of PBR Materials

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public MaterialDefinitionList GetMaterialDefinitions(MaterialList materials)
    Parameters
    Type Name Description
    MaterialList materials

    The PBR Materials

    Returns
    Type Description
    MaterialDefinitionList

    GetMaterialMainColor(uint)

    Get the main color on any material pattern type

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public ColorAlpha GetMaterialMainColor(uint material)
    Parameters
    Type Name Description
    uint material

    The material

    Returns
    Type Description
    ColorAlpha

    GetMaterialPattern(uint)

    Gets the MaterialPattern name of the material

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public string GetMaterialPattern(uint material)
    Parameters
    Type Name Description
    uint material

    The material to find the pattern

    Returns
    Type Description
    string

    GetMaterialPatternType(uint)

    Returns the MaterialPatternType name of the material

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public MaterialPatternType GetMaterialPatternType(uint material)
    Parameters
    Type Name Description
    uint material

    The material to find the pattern

    Returns
    Type Description
    MaterialPatternType

    GetMaterialUserData(uint, uint)

    Set or replace a userdata stored on an material

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public IntPtr GetMaterialUserData(uint userDataId, uint material)
    Parameters
    Type Name Description
    uint userDataId

    UserData identifier provided by subscribeToMaterialUserData

    uint material

    Material that store the user data

    Returns
    Type Description
    IntPtr

    GetMultipleMaterialUserData(uint, MaterialList)

    Batch version of getMaterialUserData

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public PtrList GetMultipleMaterialUserData(uint userDataId, MaterialList materials)
    Parameters
    Type Name Description
    uint userDataId

    UserData identifier provided by subscribeToMaterialUserData

    MaterialList materials

    Materials that store the user data

    Returns
    Type Description
    PtrList

    GetPBRMaterialInfos(uint)

    Get PBR material properties

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public PBRMaterialInfos GetPBRMaterialInfos(uint material)
    Parameters
    Type Name Description
    uint material

    The material to get properties

    Returns
    Type Description
    PBRMaterialInfos

    GetPointsAndMaterialFromText(string, string, int, Matrix4, Color, double, double)

    Returns a list of 3D Points and a material from a string and a fontname

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public GetPointsAndMaterialFromTextReturn GetPointsAndMaterialFromText(string text, string fontName, int fontSize, Matrix4 matrix, Color colorInput, double offset = 0, double height3D = 0)
    Parameters
    Type Name Description
    string text

    Input text

    string fontName

    Fontname

    int fontSize

    FontSize

    Matrix4 matrix

    Input matrix for the text

    Color colorInput

    Color of the font needed

    double offset

    Input offset for the text

    double height3D

    Input height in 3D which will be a ratio from the textSize

    Returns
    Type Description
    GetPointsAndMaterialFromTextReturn

    GetStandardMaterialInfos(uint)

    Get standard material properties

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public StandardMaterialInfos GetStandardMaterialInfos(uint material)
    Parameters
    Type Name Description
    uint material

    The material to get properties

    Returns
    Type Description
    StandardMaterialInfos

    GetUniformPropertyType(uint, string)

    Get a shader uniform shader property type

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public ShaderUniformType GetUniformPropertyType(uint pattern, string name)
    Parameters
    Type Name Description
    uint pattern

    The custom pattern

    string name

    Name of the property to get the type from

    Returns
    Type Description
    ShaderUniformType

    GetUnlitTextureMaterialInfos(uint)

    Get unlit texture material properties

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public UnlitTextureMaterialInfos GetUnlitTextureMaterialInfos(uint material)
    Parameters
    Type Name Description
    uint material

    The material to get properties

    Returns
    Type Description
    UnlitTextureMaterialInfos

    HasMaterialUserData(uint, uint)

    Set or replace a userdata stored on an material

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public bool HasMaterialUserData(uint userDataId, uint material)
    Parameters
    Type Name Description
    uint userDataId

    UserData identifier provided by subscribeToMaterialUserData

    uint material

    Material that potentially store the user data

    Returns
    Type Description
    bool

    HasMultipleMaterialUserData(uint, MaterialList)

    Batch version of hasMaterialUserData

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public BoolList HasMultipleMaterialUserData(uint userDataId, MaterialList materials)
    Parameters
    Type Name Description
    uint userDataId

    UserData identifier provided by subscribeToMaterialUserData

    MaterialList materials

    Materials that potentially store the user data

    Returns
    Type Description
    BoolList

    ImportImage(string)

    Import an image

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public uint ImportImage(string filename)
    Parameters
    Type Name Description
    string filename

    Filename of the image to import

    Returns
    Type Description
    uint

    IsOpaque(uint)

    Check if material is opaque. Function will return 'False' if:\n- The 'Opacity' Coeff is not 1.0\n- The 'Opacity' property is a Texture\n- The 'Albedo' property is a Texture and at least one pixel of the texture has an alpha value

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public bool IsOpaque(uint material)
    Parameters
    Type Name Description
    uint material

    Material to check opacity

    Returns
    Type Description
    bool

    MakeMaterialNamesUnique(MaterialList)

    Rename materials to have a unique name for each one

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public void MakeMaterialNamesUnique(MaterialList materials = null)
    Parameters
    Type Name Description
    MaterialList materials

    Materials to rename (rename all materials if empty)

    RemapIndexMap(ImageList, int)

    create remapped versions of index maps

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public RemapIndexMapReturn RemapIndexMap(ImageList maps, int maxIndices)
    Parameters
    Type Name Description
    ImageList maps

    Input Images

    int maxIndices

    Number max of indices remapped

    Returns
    Type Description
    RemapIndexMapReturn

    RemoveImageChangedCallback(uint)

    Declaration
    public void RemoveImageChangedCallback(uint id)
    Parameters
    Type Name Description
    uint id

    RemoveMaterialChangedCallback(uint)

    Declaration
    public void RemoveMaterialChangedCallback(uint id)
    Parameters
    Type Name Description
    uint id

    ResizeImage(uint, int, int, ResizeFilterMethod)

    Resize an image

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public void ResizeImage(uint image, int width, int height, ResizeFilterMethod filteringMethod = ResizeFilterMethod.DEFAULT)
    Parameters
    Type Name Description
    uint image

    Image to be resize

    int width

    New image width

    int height

    New image height

    ResizeFilterMethod filteringMethod

    Filtering method for image resizing

    SetCoeffOrTextureProperty(uint, string, CoeffOrTexture)

    Set a CoeffOrTexture property

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public void SetCoeffOrTextureProperty(uint material, string name, CoeffOrTexture coeffOrTexture)
    Parameters
    Type Name Description
    uint material

    The material to apply the color on

    string name

    The property to set

    CoeffOrTexture coeffOrTexture

    The CoeffOrTexture to apply

    SetColorAlphaProperty(uint, string, ColorAlpha)

    Set a ColorAlpha property

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public void SetColorAlphaProperty(uint material, string name, ColorAlpha color)
    Parameters
    Type Name Description
    uint material

    The material to apply the color on

    string name

    The property to set

    ColorAlpha color

    The color to apply

    SetColorOrTextureProperty(uint, string, ColorOrTexture)

    Set a ColorOrTexture property

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public void SetColorOrTextureProperty(uint material, string name, ColorOrTexture colorOrTexture)
    Parameters
    Type Name Description
    uint material

    The material to apply the color on

    string name

    The property to set

    ColorOrTexture colorOrTexture

    The ColorOrTexture to apply

    SetFragmentShader(uint, string)

    Set the fragment shader of a custom pattern

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public void SetFragmentShader(uint pattern, string code)
    Parameters
    Type Name Description
    uint pattern

    The custom pattern to edit

    string code

    The GLSL code of the fragment shader

    SetMaterialMainColor(uint, ColorAlpha)

    Set the main color on any material pattern type

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public void SetMaterialMainColor(uint material, ColorAlpha color)
    Parameters
    Type Name Description
    uint material

    The material to apply the color on

    ColorAlpha color

    The color to apply

    SetMaterialPattern(uint, string)

    Sets the MaterialPattern name of the material

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public void SetMaterialPattern(uint material, string pattern)
    Parameters
    Type Name Description
    uint material

    The material to find the pattern

    string pattern

    The pattern of the material

    SetMaterialUserData(uint, uint, IntPtr)

    Set or replace a userdata stored on an material

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public void SetMaterialUserData(uint userDataId, uint material, IntPtr userData)
    Parameters
    Type Name Description
    uint userDataId

    UserData identifier provided by subscribeToMaterialUserData

    uint material

    Material that will store the user data

    IntPtr userData

    User data to store in the given material

    SetMultipleMaterialUserData(uint, MaterialList, PtrList)

    Batch version of setMaterialUserData

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public void SetMultipleMaterialUserData(uint userDataId, MaterialList materials, PtrList userDataList)
    Parameters
    Type Name Description
    uint userDataId

    UserData identifier provided by subscribeToMaterialUserData

    MaterialList materials

    Materials that will store the user data

    PtrList userDataList

    User data to store on each material

    SetPBRMaterialInfos(uint, PBRMaterialInfos)

    Set PBR material properties

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public void SetPBRMaterialInfos(uint material, PBRMaterialInfos infos)
    Parameters
    Type Name Description
    uint material

    The material to set properties

    PBRMaterialInfos infos

    The PBRMaterialInfos properties

    SetVertexShader(uint, string)

    Set the vertex shader of a custom pattern

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public void SetVertexShader(uint pattern, string code)
    Parameters
    Type Name Description
    uint pattern

    The custom pattern to edit

    string code

    The GLSL code of the vertex shader

    SubscribeToMaterialUserData()

    subscribe to material user data. multiple different userdata can be stored on the same materials if subscribeToMaterialUserData is called multiple times

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public uint SubscribeToMaterialUserData()
    Returns
    Type Description
    uint

    UnsetMaterialUserData(uint, uint)

    Unset the userdata stored on an material

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public void UnsetMaterialUserData(uint userDataId, uint material)
    Parameters
    Type Name Description
    uint userDataId

    UserData identifier provided by subscribeToMaterialUserData

    uint material

    Material that will store the user data

    UnsetMultipleMaterialUserData(uint, MaterialList)

    Batch version of unsetMaterialUserData

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public void UnsetMultipleMaterialUserData(uint userDataId, MaterialList materials)
    Parameters
    Type Name Description
    uint userDataId

    UserData identifier provided by subscribeToMaterialUserData

    MaterialList materials

    Materials that will store the user data

    UnsubscribeFromMaterialUserData(uint)

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public void UnsubscribeFromMaterialUserData(uint userDataId)
    Parameters
    Type Name Description
    uint userDataId

    UserData identifier to unsubscribe

    UpdateImageFromDefinition(uint, ImageDefinition)

    Update an image from its raw data

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public void UpdateImageFromDefinition(uint image, ImageDefinition imageDefinition)
    Parameters
    Type Name Description
    uint image

    The image to update

    ImageDefinition imageDefinition

    The new data to apply

    UpdateImagesFromDefinitions(ImageList, ImageDefinitionList)

    Update images from their raw data

    Declaration
    [HandleProcessCorruptedStateExceptions]
    public void UpdateImagesFromDefinitions(ImageList image, ImageDefinitionList imageDefinitions)
    Parameters
    Type Name Description
    ImageList image

    The image to update

    ImageDefinitionList imageDefinitions

    The new data to apply

    Version 2024.3.0.10
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX.