0 votes
ProjectSettings.set_setting("rendering/quality/filters/anisotropic_filter_level", 16)
ProjectSettings.save()

Doesn't change anything, even after restarting the game.

in Engine by (133 points)

That call to save() should store the value in the project.godot file. Can you verify whether that's happening?

No, it is not saved for a reason. It's not in project.godot file.

Using Godot 3.2.1 stable.official on Windows 10...

I just added (via cut/paste) your two posted code lines to the _ready() function of a scene script. Running that scene immediately updates my project.godot file with the following info:

[rendering]

quality/filters/anisotropic_filter_level=16

Hmmm...

However, when I click back on the Godot editor window (even with the scene still running), that information is immediately removed from the file. Not sure what that means...

I've found that changes made in external editors to project files get overriden by Godot if the editor is open. Perhaps that's what's happening, the editor notices a difference between the project file and its cached copy, and prefers the cached one.

Thank you! I will try this in the exported game.

Is there any other/better way for implementing anisotropic filter settings in the graphics options?

I assume you're aware, but to be sure...

You can set the value from the Editor, via:

Project | Project Settings | Rendering | Quality | Anisotropic Filter Level

Yes but I want to add it to my ingame graphics settings.

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.