Hey Chris,
I'm trying to implement a brightness option in the options menu that would allow players to increase or reduce the brightness of the game. Since AC doesn't have built-in brightness support, what is the best approach to implement it?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
You'd first need a means to control the brightness through custom script, based on your chosen render pipeline. This isn't an AC topic, but you should be able to find plenty of resources for this online.
Once you have a script that can sync the brightness with a float variable (i.e. 0 = most dark, 1 = most bright), you can link it to an AC Global Float variable that's linked to Options Data so that its value is saved per-Profile.
A tutorial that covers this process can be found here. The key difference would be the custom script's
Apply
function, which would instead set the brightness instead of the text-scroll speed.Thank you, Chris.
I created two scripts (with some help from AI): one is attached to the UI slider, and the other is attached to every scene in the game. They seem to be working well. I’m sharing the scripts here in case other members want to use them.
1) Attach this script to your scene, then drag the Global Light 2D object into the Global Light field.
2) Attach this script to your Brightness slider: