Topic was automatically imported from the old Question2Answer platform.
Asked By
Igor Ferencina
Hi, im a beginner of Godot Engine, I had two warnings in my project, the two warnings are these: W 0:00:01.457 The function ‘change_scene()’ returns a value, but this value is never used; the second warning is this: W 0:00:01.296 _update_root_rect: Font oversampling does not work in ‘Viewport’ stretch mode, only ‘2D’.
now I pass the script:
extends Node
func _on_ChangeScene_pressed():
var principale = "res://Principale.tscn"
get_tree().change_scene(principale)
pass
change_scene() returns a value, but this value is never used
change_scene() returns a value of type Error. However, you’re ignoring that. Do something like this and the warning will be gone:
var error = get_tree().change_scene(principale)
if error:
print("ERROR: could not change scene, code: ", error)
_update_root_rect: Font oversampling does not work in ‘Viewport’ stretch mode, only ‘2D’.
If you’re using DynamicFonts somewhere, something called “font oversampling” is used by default (see Project Settings > Rendering > Quality > Use Oversampling). However, it won’t work if you set the strech mode to “Viewport” (under Project Settings > Display > Window > Stretch > Mode). Then fonts will become blurry if you scale up the base resolution of your game. If you want to avoid that, use “2D” instead of “Viewport”.