- Home /
Can't use "Integer" type in Shader property?
Compilation error using "Integer" in Shader Properties. Unity version: 2020.3.33f1 Using "Int" is fine, but I need to pass a real Integer, not baked into a float. The shader code is as follows:
Shader "Unlit/NewUnlitShader" { Properties { _MainTex ("Texture", 2D) = "white" {} _ExampleName ("Integer display name", Integer) = 1 } SubShader ...
The console prompts an error: Shader error in ‘NewUnlitShader’:Parse error:syntax error,unexpected TVAL_ID at line 6
Comment