Incorrect number of arguments to numeric-type constructor

Borys Koreniev 2 years ago updated by jackielo 2 years ago 9

Using Unity 2017.3.0f3

When shader is created an error appears

Shader error in 'shaderName': incorrect number of arguments to numeric-type constructor at line 500 (on d3d11)

Compiling Vertex program

The line 500 is:

uv_image1 = uv_image1+fixed2(1,192093E-07,5,960464E-08);    

By some reason in fixed2 commas are generated instead of dots.

(0,0,0,0) instead of (0.0,0.0)

Under review

Thank you for submitting this bug with details. I will fix it asap. For fixing it properly, would you please give me more info? Please provide your device/CPU/GPU info, Shader Weaver version and the shader file to JackieLo@aliyun.com

Can you please confirm, that you've got the message. If you have any other questions or maybe need some help with this bug, please don't hesitate to contact me. 

Message received. I am working on it .

I think your project or some 3rd party assets in your project might overwrited struct Vector2 in scripts?

Please create an empty project, import  Shader Weaver from asset store and see if it works.

Should try that before writing a bug report, sorry. 
In a new project, SW is working perfectly, but it occurred to be so not because of 3rd party assets. A new project has by default a .Net 3.5 while I was using .Net 4.6. I changed scripting runtime version of the new project and the problem has returned. 

Using 4.6 is not vital for me so I'll get back to 3.5, thanks!

I tried .Net 4.6 with my Win7 PC. SW works fine. I am gonna check it with Win10 and Mac.

I have tried .Net 4.6 with Win10/Win7/Mac. None of them has this problem. Do you have any other special setting?

No. It was a clear project on Unity 2017.3 and the only setting I changed was a .Net version. I ll dig a little bit and would let you know if something would show up.