Closed Noxalus closed 4 years ago
Adding a game object to outline effect like that actually adds it to the 1st layer of the attached outline layer collection. So what you could do to remove it is:
outlineEffect.OutlineLayers[0].Remove(myGo);
Thanks a lot for your answer! I didn't saw the propery for the OutlineLayer from the OutlineEffect class.
Thank you very much for the commit too, it still makes sense to have a method to inverse the AddGameObject
action. 👍
Hello!
From the documentation, there is an example of how to add GameObject to a specific layer from an OutlineEffect component:
My question is: how can we remove this GameObject from the outline effect when we don't want the outline anymore?
In my case, I would like to outline the object when it's selected, and hide the outline if it's not selected anymore.
It couldn't be needed to have a method like this to do what I want, but I don't know how to do it 🤔
Thanks in advance for your help!