A downloadable tool
A simple effect that imitates rays of light on a 2D surface. Note that it's not projecting any real light that interacts with objects or casts shadows - it's just an animated texture based on Perlin noise shader.
It can be pretty useful for adding some atmospheric effects to 2D games. It's lightweight and works great on mobile devices.
How to use
To create new LightRays 2D object in your scene, click on GameObject menu in Unity window, then go to Effects and then click LightRays2D.
That's it, now you have a quad with LightRays tecture on it. Now you can resize it, set the colors and adjust the sliders untill you achieve the desired effect.
2018-05-20 - Added s way to create a Canvas object.
2017-03-18 - Fixed a floating point issue.
2017-03-19 - Added option for a second color to create a gradient.
2017-10-28 - Added scripts so the object could be instantiated from menu. Updated the shader.
2017-11-24 - Added support for sorting layers. Works same as for sprites.
Click download now to get access to the following files:
Log in with itch.io to leave a comment.
Works like a charm. There is a bug that chooses sorting layer and clicks "Add sorting layer", nothing happened but only warning message:
ExecuteMenuItem failed because there is no menu named 'Edit/Project Settings/Tags and Layers'
UnityEngine.StackTraceUtility:ExtractStackTrace ()
LightRays2DEditor:OnInspectorGUI () (at Assets/LightRays2D/Editor/LightRays2DEditor.cs:97)
UnityEditor.EditorGUI/PopupCallbackInfo:SetEnumValueDelegate (object,string[],int)