- Home /
Unity 2d - drawing effects composed of sprites
Let's say I want to generate a lightning from like 3 parts in spritesheet. Is there any way to draw these graphics parts directly on screen and not to create sprite for each of them? These can be quite frequent and they basically don't represent any real game entity, just effect. Or is the only way to do this to create bunch of sprites for each instance of lightning, and let Unity handle the drawing. Will this by handled efficiently Unity?
Create a prefab of your lightning bolt. Instantiate the lightning bolt in the correct locations at the appropriate time adjusting scale and position and rotation as needed. Could also look into creating your lightning bolt as a material and using a particle system.
But when I instantiate the prefab, how to draw this instance multiple times? If i want lightning that has three same images to render, do i need to instantiate 3 prefabs?
Your answer
Follow this Question
Related Questions
Rendering using the Transparent queue 1 Answer
2D Lights are Opaque on White Background (URP) 1 Answer
How to create texture from multiple sprite in unity2d? 0 Answers
Sorting Axis on LWRP? 1 Answer
Can't use depth of field script 0 Answers