Search Unity

Reflections - SSR?

Discussion in 'General Graphics' started by topofsteel, Mar 6, 2015.

  1. hyperrodik

    hyperrodik

    Joined:
    Jul 16, 2014
    Posts:
    27
    hi people. got a problem with this one. I downloaded it and once I try to place it into my project to try it , it shows me an error in script DemoUI.cs(28,14: error SC0101: The namespace 'global::' already contains a definition for 'DemoUI' . Does anyone can tell me how can I fix this please?
     
  2. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,790
    There's another component in your project with the same name. Do a search in your project list for DemoUI and see how many items show up.
     
  3. hyperrodik

    hyperrodik

    Joined:
    Jul 16, 2014
    Posts:
    27
    You're star! all fixed. found another DmoUI script in SSAO folder, so all fixed now, Thank You
     
  4. DCrosby

    DCrosby

    Joined:
    Jan 13, 2013
    Posts:
    86
    I'm having a bit of an issue, I'm trying to move all the scripts into a "Code80" folder, so I can separate functionality from example content, as well as not cluttering up my own folder hierarchy, but when I do so,

    It works fine when I click [play] in the editor, but when I run the final executable I get a black screen. Any Ideas ?

    So by process of elimination I've found that the Function [CreateMaterialsIfNeeded] is cauing the path issues, I'm looking into why, as they're written like the code examples for those functions. http://docs.unity3d.com/ScriptReference/Shader.Find.html
    For now a workaround is to expose the material variables as "Public", then create Materials of the Shaders, and populate them in the SSR.cs Script (In The Editor).
     
    Last edited: Jul 19, 2015
  5. kode80

    kode80

    Joined:
    Aug 1, 2013
    Posts:
    151
    Make sure all the included shaders are in /Assets/Resources/Shaders. Since the shaders aren't attached to materials, Unity doesn't know to include them in builds, placing them in the resources folder tells Unity you want them included in a stand alone build.
     
  6. sputnikbar

    sputnikbar

    Joined:
    Jan 3, 2013
    Posts:
    78
    Hi,

    this effect is amazing.
    Nethertheless, I'm going into trouble if I want to use it in a webGL deployment.
    Did anyone have this issue ?