0 votes

Hello Everyone,
I'm trying to change shadow quality through a script at runtime in a game destined for mobile, but it seems I can't get it to work,
this is the script:

func _on_shadowSlider_value_changed(value):
match value:
        print(ProjectSettings.set_setting("rendering/quality/directional_shadow/size.mobile", 1024))
        ProjectSettings.set_setting("rendering/quality/directional_shadow/size", 1024)
        ProjectSettings.set_setting("rendering/quality/directional_shadow/size.mobile", 2048)
        ProjectSettings.set_setting("rendering/quality/directional_shadow/size", 2048)
        ProjectSettings.set_setting("rendering/quality/directional_shadow/size.mobile", 4096)
        ProjectSettings.set_setting("rendering/quality/directional_shadow/size", 4096)

I've also tried putting an empty file called override.cfg in the project folder
I'm sorry if this question has already been asked more than once and thank you in advance for your time

Godot version 3.2.3
in Engine by (34 points)

Please log in or register to answer this question.

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 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 webmaster@godotengine.org with your username.