1

I would like to have a visual effect as follows in my Unity project. I want the circles to change color every second if possible.

enter image description here

Is there any way to have this without any additional library? If not, please, link your suggestion. Thank you in advance.

2 Answers2

2

You can use particle effects:

https://www.youtube.com/watch?v=byxivSC1xYM

This is how it worked at my end: enter image description here

Ring png I made

Note: In the tutorial, the shader for the material was selected "Particles/Additive". It's deprecated. If you don't see that option, choose "Particles/Standard Surface", and Set the Rendering Mode under "Blending Options" "Additive".

demonstration

1

If the size is constant, you can simply turn that image you already have into a black and white image (White rings and black/transparent background), and then change the color each second or so.

class Rings {
  void Start() {
    StartCoroutine(this.ChangeColor());
  }
  IEumerator ChangeColor() {
    yield return new WaitForSeconds(1);
    this.GetComponent<SpriteRenderer>().color = newColor;
  }
}
Yifei Xu
  • 777
  • 1
  • 6
  • 14
  • Is there any way to solve the problem programmatically? – Eminent Emperor Penguin Mar 12 '19 at 18:10
  • In that case, you'll have to create your own 2D mesh. I am not very experienced with it either, but you can follow this link here https://stackoverflow.com/questions/50606756/creating-a-2d-circular-mesh-in-unity For full circles, have the triangles emit out from the center like a pizza slice. For the ring, you'll have to use trapezoids to simulate the ring shape – Yifei Xu Mar 12 '19 at 18:20