Remember that cool projected shadows stuff that Aras honed for us in this thread:
Does anyone know how you can get it to cast shadows only on objects on a given layer?
Remember that cool projected shadows stuff that Aras honed for us in this thread:
Does anyone know how you can get it to cast shadows only on objects on a given layer?
I think what I did there is set the Projector (that is created internally by the shadow script) to cast on all layers except the layer of the “character”. So you could just change the place where it sets up Projector’s layers.
Thanks, Aras.
Could that be scripted so that it is set dynamically in the inspector, like the culling? Or does it have to be hard-coded in the shader/helper script?
It’s just a script like any other script. So if you want to expose something in the inspector - just go ahead and expose it, and make the script use that.
I’m not sure how to do that.
I mean, I know how to make a GameObject, Transform, etc. selectable in the inspector.
What I don’t know is how I can make a multi-picklist (i.e. like the inspector culling list for lights) in the inspector. Is that even something I can do?
Yes, you use the LayerMask type, and use .value to get the integer value from it.
–Eric
Ooooh, cool!
Thanks, E-man!
Okay, I give up.
Between the ProjectedShadow script being written in C# and me being pretty darned dumb, I can’t figure it out.
Can anyone out there tell me how to make the ProjectedShoadow script referenced above cast shadows only from (multiple, selected) objects?
I’m not picky about how the shadow-casting objects are selected either - it can be by picklist, layermask, tags, a-priori naming, or whatever else might help.
Thanks in advance to whomever it may concern!