Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles

Shader Error in 2018.2

A topic by Rasmus Dyhr Larsen created 49 days ago Views: 60 Replies: 2
Viewing posts 1 to 3

Hello! I just imported the package into my existing project in Unity 2018.2.10 and immidiatly when I open an example scene I noticed that the shader doesn't compile. In the scene view there is just a purple square, and the console outputs the following:

"Shader error in 'Hidden/_Flat Shapes - Logo_584348442.generated': incorrect number of arguments to numeric-type constructor at line 1405 (on d3d11)"

Actually, I quickly found that issue comes from the fact that we use , instead of . in Denmark, so it's probably the locale that needs to be fixed somehow.

When compiled on a Danish computer it looks like this:

float2(_2795654272Distance, /*material ID*/1,5)

Hi Rasmus,

For future reference the problem isn't the locale, since the code syntax for HLSL is the same across languages, and arguments in functions are always separated by commas. Instead, the error seems to come from Direct3D 11 expecting a different amount of arguments for a function.

The fix you're showing us should actually cause a syntax error on Windows. Perhaps Unity is compiling it anyway because you're not on Windows using d3d11?

Do you get the same error in Unity 2017?