There is an existing function exposed to set the anchor preset in code:
However, the Inspector contradicts:
From minimal testing, it appear that the Inspector is more correct, and the function didn't do anything that I could tell when I tried it. However, there appears to be a thorough discussion on the matter:
godotengine/godot#66651
...and there's a PR to fix:
godotengine/godot#116330
There is an existing function exposed to set the anchor preset in code:
However, the Inspector contradicts:
From minimal testing, it appear that the Inspector is more correct, and the function didn't do anything that I could tell when I tried it. However, there appears to be a thorough discussion on the matter:
godotengine/godot#66651
...and there's a PR to fix:
godotengine/godot#116330