I’m not sure if this is correct, but I’m working on a script that would change the color of both a light component and a sprite renderer component (to the same value or a mapping of the same value).
Because of this I want to specify it only once (and I believe it makes sense to do so in this new script I’m writting, but that’s besides the point). In doing this, however, I’m allowing the value to be changed in the light and spriterenderer scripts, despite the fact that they will be overwritten.
Is it possible to create a custom editor that will lock the color property of these two scripts when my specific script is added?
As a work-around I’m also overwritting these values with the OnValidate() callback, but I’d still like to do this if possible.