UnityEditor.ShaderUtil.GetTexDim C# (CSharp) Method

GetTexDim() private method

private GetTexDim ( Shader s, int propertyIdx ) : TextureDimension
s UnityEngine.Shader
propertyIdx int
return TextureDimension
        public static extern TextureDimension GetTexDim(Shader s, int propertyIdx);
        [MethodImpl(MethodImplOptions.InternalCall)]

Usage Example

示例#1
0
 /*
  * private static string[] kShaderLevels = new string[]
  * {
  *      "Fixed function",
  *      "SM1.x",
  *      "SM2.0",
  *      "SM3.0",
  *      "SM4.0",
  *      "SM5.0"
  * };
  */
 private static string GetPropertyType(Shader s, int index)
 {
     ShaderUtil.ShaderPropertyType propertyType = ShaderUtil.GetPropertyType(s, index);
     if (propertyType == ShaderUtil.ShaderPropertyType.TexEnv)
     {
         return(ShaderForgeInspector.kTextureTypes[(int)ShaderUtil.GetTexDim(s, index)]);
     }
     return(ShaderForgeInspector.kPropertyTypes[(int)propertyType]);
 }
All Usage Examples Of UnityEditor.ShaderUtil::GetTexDim