What a cute game, love it! Thanks for sharing and for the kind words
As the description says, it does support URP 2D Renderer lights, you can see how to setup the project and how to use it in the Documentation (at the very beginning First Steps (Must Read) section ) or in these 2 video tutorials:
Hi was wondering what is the best way to activate and deactivate particular shader effects. For example, if my player is dashing I want to enable the motion blur and disable it after the dashing is finished. How should I do that?
Thanks for making this amazing asset. Now I donât have to go in shader graph to try and spend a lot of hours to make it myself.
Thanks for reaching out. Iâm really happy to hear that you are enjoying the asset
I talk about enabling/disabling effects in the âHow to Enable/Disable Effects at Runtimeâ section of the Documentation PDF.
The main takeaway is that although you can turn off the effect through code the best way of doing it is to have all effects you will use enabled and then just tweaking the values at runtime either with an animation (see tutorial):
You can also do it with code, take a look at the âScriptingâ section of the Documentation for that. But in your case you could do:
material.SetFloat(â_MotionBlurDistanceâ, newBlurDist);
how does it work on animated sprites? Since when something moving itâs playing the animation and I want to add that VFX while they are animating. Some of my sprites are frame-based. They are single frames, not sprite sheet.
I was just thinking to enable the script and disable it.
Hi,
Is there a way to change the colour of the cloth only but not the entire sprite? Say I want o use it to show that new equipment is being a worn or something.
You can place your character inside a hierarchy of objects and have more than 1 Animator, 1 for effects and the other one for VFX. You could also have a Animator with multiple layers, but I recommend splitting them up.
You could also do all VFX stuff by script if you prefer.
For color swapping specific parts of a sprite you have many options. The most straight forward ones would be Color Swap and Color Change. Thereâs many examples of those effects and many other color swaps on the Demo scene. Please take a look and ask if you have any further questions
If youâre only using Standard pipeline and really need shadow casting with this shader, there is a hacky way to add it in a pinch. BE WARNED this may mess up something else in the AllIn1SpriteShader so Iâm not recommending it (and GeriB Iâm happy to delete this comment if youâd rather this wasnât done), but if you edit the shader code and add this pass in near the end, the sprite will cast shadows:
No, there are no effects that grab information from the scene in any way. No way of interacting with color, depth, normals or anything else. All effects are self contained and can only be affected by their Material (except URP 2D Renderer shader that gets affected by 2D lights)
I updated my project to 2021.2.0f1 (URP 12 with 2d renderer) , and I have 2 shader error :
â[Worker30] Shader error in âAllIn1SpriteShader / AllIn1Urp2dRendererâ: âCombinedShapeLightSharedâ: cannot implicitly convert from âhalf4â to âstruct SurfaceData2Dâ at line 1182 (on d3d11)â
âShader error in âAllIn1SpriteShader/AllIn1Urp2dRendererâ: Couldnât open include file âPackages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlslâ. at line 248â
If URP is properly installed and the URP package of the asset is extracted you shouldnât face any errors.
In case of doubt the steps are explained in the Documentation and YouTube tutorial playlist. If you are still having problems it may means that Unity have changed the implementation of the 2D Renderer, but chances are that you just need a URP project, export the URP package of the asset and assign a 2D Renderer Asset Pipeline to Project Settings
Thanks for the heads up and for the solution!
Itâs really annoying when Unity changes the implementation of their stuff with no chance for back compatibility