cakeslice / Outline-Effect

Outline Image Effect for Unity
MIT License
1.48k stars 201 forks source link

Add outline to all child Renderers from where it's applied #37

Closed AdamClements closed 3 years ago

AdamClements commented 6 years ago

First of all - thanks for the great library.

Almost every time I've used this library I've found myself intuitively wanting to apply the Outline component to a parent object and have it apply automatically to all children. Usually I have one gameobject where I conceptually turn on/off the outline and expect everything within to be outlined, and going through turning it on/off for each renderer is a real hassle.

I would be interested to hear your opinion on that and have attached the code for how I prefer to use this effect. There are some issues with this PR, but I wanted to start the discussion about whether this was worthwhile or if I've missed something before I put the work into polishing this.

Outstanding issues with this PR:

AdamClements commented 6 years ago

Just noticed a bug - if the list of children changes after the fact then they won't get highlighted. I've fixed it locally, if you're interested in this as a feature, I'll update the PR

cakeslice commented 6 years ago

Thank you for the contribution, and sure if you could upload the fix that would be great!