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 Answers 2

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;
  }
}
2
  • Is there any way to solve the problem programmatically? Mar 12, 2019 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 stackoverflow.com/questions/50606756/… 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, 2019 at 18:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.