- Home /
CG Shader Properties Parse Error
This is the strangest thing I have ever seen in all my programming experience. Here's the situation -
 Shader "SomeShader" {
     Properties {
         _MainTex ("Base (RGB)", 2D) = "white" {}
         _Color("Diffuse Color", Color) = (1.0, 1.0, 1.0, 1.0)
         _SquashAmount (“Squash”, Float) = 1
         //_SquashAmount ("Squash", Float) = 1
     }
The code above does not work. But this -
 Shader "SomeShader" {
     Properties {
         _MainTex ("Base (RGB)", 2D) = "white" {}
         _Color("Diffuse Color", Color) = (1.0, 1.0, 1.0, 1.0)
         //_SquashAmount (“Squash”, Float) = 1
         _SquashAmount ("Squash", Float) = 1
     }
This code above works.
Basically getting a parse error. I have tried many times and the second SquashAmount line always works while the first does not. I swear I'm not lying.
Can anyone demystify this?
Thanks.
Answer by benhumphreys · Mar 12, 2014 at 05:57 AM
In your first example, the quotation marks around Squash are not normal ascii quotation marks. They're weird "smart quotes".
ahh. You sir are a genuis. I didn't even know such things exists and I dont know how I managed to write smart qoutes ins$$anonymous$$d of normal quotes. Could you explain that?
Your answer
 
 
             Follow this Question
Related Questions
A node in a childnode? 1 Answer
Parse Error on OutlinedDiffuse Shader 0 Answers
Accessing shader property breaks shader 0 Answers
Error CS0016 in Unity? 0 Answers
Destroy(this) not working properly 2 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                