Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Shader error in '': Parse error: syntax error at line 1

Discussion in 'Scripting' started by DragonMind, Jul 18, 2014.

  1. DragonMind

    DragonMind

    Joined:
    Feb 18, 2014
    Posts:
    5
    I am using the free version of Unity.

    The shaders I am using is:
    'Transparent/Diffuse'
    'Transparent/VertexLit'

    When I push the play button, a lot of lines is generated:
    Shader error in '': Parse error: syntax error at line 1

    I have not clue what line 1, and where.

    Could this be a limitation because I use the free version?
    ...or what is wrong, really hard to figure out as this error
    message doesn't a lot about where to look.
     
  2. Magiichan

    Magiichan

    Joined:
    Jan 5, 2014
    Posts:
    403
  3. DragonMind

    DragonMind

    Joined:
    Feb 18, 2014
    Posts:
    5
    I asume it it the same shaders that come with Unity 4.5.2,
    and I decided to download and upgrade Unity to that version,
    since it turned out I had an older version.

    How ever the 'new' shaders did not fix the problem.
     
  4. Magiichan

    Magiichan

    Joined:
    Jan 5, 2014
    Posts:
    403
    Are you sure that these are the shaders that are giving the error?
     
  5. DragonMind

    DragonMind

    Joined:
    Feb 18, 2014
    Posts:
    5
    I am pretty sure ...at least as sure one can be
    from the given rather undetailed error message.
    Since the mentioned ones and 'Diffuse' are the
    only shaders I use. The log says it's a shader error
    (as you can see in my original/starter post).
     
  6. joa-baur

    joa-baur

    Joined:
    May 14, 2013
    Posts:
    24
    It should not be a problem with the free version of Unity nor with the built-in shaders.

    Apparently Unity does not like the shader files to be in UTF-8 format, according to this old thread from 2009

    Are you sure you have no custom/modified shaders on your objects? Maybe a shader from the Asset Store or copied over from some other OS?
     
  7. DragonMind

    DragonMind

    Joined:
    Feb 18, 2014
    Posts:
    5
    I have no custom made or modified shaders, I am sure.
    The only home made are the art, used with the shaders, in materiels.