0 votes

I see there's a function called VisualServer.SetDefaultClearColor(), which lets me set the default background color. That's cool and all, but is there a way for me to get the current background color? I know I can look in the project settings, but I want to get this value programmatically.

in Engine by (18 points)

1 Answer

0 votes

It's a little hacky, but you can get this value using the ProjectSettings class:

var c = (Color)ProjectSettings.GetSetting("rendering/environment/default_clear_color");

by (18 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.