Search Unity

Rainbow effect in C#

Discussion in 'Scripting' started by sonys222, Oct 6, 2015.

  1. sonys222

    sonys222

    Joined:
    Jun 3, 2015
    Posts:
    32
    Hi. Does anyone has code on a rainbow effect in C # ? I searched the forum but have not found and completely I don't know how to do it,
     
  2. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    7,071
    We need a little more context. Where do you want this rainbow effect to appear? On the screen? In a texture? In a skybox?
     
  3. sonys222

    sonys222

    Joined:
    Jun 3, 2015
    Posts:
    32
    In a slider.
     
  4. sonys222

    sonys222

    Joined:
    Jun 3, 2015
    Posts:
    32
  5. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    4,849
    Isn't a rainbow just a colored texture that is transparent? Draw the texture, put it on a sprite, make it the size you want, put it in the scene and you're done.

    I imagine a rainbow would be handled much like a "god ray," which is basically a type of simulation of a volume lighting phenomenon associated with atmospheric scatter.
     
unityunity