I apologize if this is an elementary question, but I can’t seem to figure it out on my own. Below is a picture of the AmbientLight I’m working on and the SkyPane GameObject.
What I’d like to do is change the alpha of the color in the Light Sprite script (used more than once on other game objects) from the TimeOfDayChnages script. I’d like that to also correlate that to the Time of Day which is controlled on my Sky Script. e.g. Time Of Day = 12 then color.alpha is 200. Or something to this nature. I know I’ll need to do a little bit of math to get that conversion working properly.
I looked into the code some more and I’ve been trying to figure out how to get the color variable from CustomSprite script (which is inherited into LightSprite) using getComponent into my TimeOfDayChanges script. I think I have to inherent it as well right? But then doesn’t that run into the issue of changing the color of all the light objects in the scene? I only want my AmbientLight object to be changed… I’m not too sure how to approach this problem.