Closed ATHellboy closed 4 years ago
Hello, there are 2 ways of doing this:
MyOutlineLayer
). Set it via Outline feature. Now all object assigned to the layer will be outlined.OutlineLayerCollection
. Again Outline feature must have a reference to it. Now outlines would only render around objects in the collection.Hello, there are 2 ways of doing this:
- Create Unity layer (for instance
MyOutlineLayer
). Set it via Outline feature. Now all object assigned to the layer will be outlined.- Use
OutlineLayerCollection
. Again Outline feature must have a reference to it. Now outlines would only render around objects in the collection.
Thanks for the reply. If I want to hide it, I should change the layer then ? Is it performant ?
About OutlinbeLayerCollection, this collection is accessible in a script in URP ?
I'm not sure if changing layer at runtime is a heavy operation or not. I believe it's a bad idea to do this on each frame, changing it once a minute (for instance) should not impact app performance.
OutlineLayerCollection is a scriptable object. You can assign it in inspector both to outline feature and a MonoBehavoiur responsible for selecting objects.
I don't get how I can add an object and remove an object from OutlineLayerCollection. There is no functionality about it. Just can add or remove layer.
Not sure if you get what I want. I want to make an object outlined when it is selected and remove the outline when it is deselected. And there are multiple objects in the scene and just those which are selected are outlined.
As you said, OutlineLayerCollection
is a collection of OutlineLayer
instances. OutlineLayer
, in turn, is a collection of game objects that share the same outline settings. You can add/remove game objects to OutlineLayer
just as you do it with any other collection. There are shortcuts for adding/removing game objects to the first layer in OutlineLayerCollection
as well.
Hey there, Thanks for the great outline effect.
I want to know how it is possible to enable and disable outline effect on objects in URP ? (For example when I select an Object it gets outlined and by deselecting it backs to normal)