Shader.PropertyToID 属性标识符

static function SetGlobalTexture (propertyName : string, tex : Texture) : void

Description描述

Gets unique identifier for a shader property name.

为一个着色器属性名获取唯一标识。

Shader property identifiers are used by MaterialPropertyBlock functions.

Each name of shader property (for example, _MainTex or _Color) is assigned an unique integer number in Unity, that stays the same for the whole game.

参见:MaterialPropertyBlock.

Page last updated: 2011-3-31