ShaderGUI.AssignNewShaderToMaterial

Cambiar al Manual
public void AssignNewShaderToMaterial (Material material, Shader oldShader, Shader newShader);

Parámetros

materialThe material the newShader should be assigned to.
oldShaderPrevious shader.
newShaderNew shader to assign to the material.

Descripción

This method is called when a new shader has been selected for a Material.

Can be used for setting up the new shader based on state from the previous shader. Ensure to call base.AssignNewShaderToMaterial to actually set material.shader.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961