OS All, Godot version 3 beta:
That would not be repeated:
https://godotengine.org/qa/21106/porting-project-godot-broke-switching-resolution-viewport
Since nobody suggested a solution to the problem, assuming that the degradation of functionality.
Have you tried set_size_override ?
Sorry for not having replied a lot of time.
I tested this method. It's not working.
Do a clean demo would be difficult. I have a small program - editor text content. I will soon clean it working part - only leave the settings screen and post it here. Probably this is the easiest way to show what's not working.
maybe because those methods are not implemented yet?
https://github.com/godotengine/godot/blob/master/scene/main/viewport.cpp#L214-L320
Looks like the code was commented out when making the new renderer. That's a bug for me: either they should be re-implemented or removed if the function went to somewhere else.
I need the functionality of a method "get_viewport().set_rect(Rect2)", it or its equivalent.
Here's a demo:
I haven't finished porting the 3.0 Godot, it looks bad. But it shows how it now works. There still are national characters, otherwise it is difficult to alter in the demo. I removed all extra code - as there is only the demonstration of the problem.
For example, in Godot 2.1 it worked like this:
I know, this error is a milestone 3.0. But in the news a lot is said about the transfer of some errors on 3.1. I really depend on this bug. I'm doing a porting project to Godot 3.0. But to complete this process when this bug will be fixed.
Please do not inflict it on 3.1.
you guys have Viewport.set_size(), which replaced set_rect(), since the position makes not much sense.
using SceneTree.set_screen_stretch is probably better, since you have a lot more options to control stretching and it does all automatically
well, closing since it should not be an issue.
@reduz but is set_size working? It calls _update_rect() which is commented out https://github.com/godotengine/godot/blob/master/scene/main/viewport.cpp#L214-L320
@vnen that function should be gone, as it no longer makes sense. Seems I forgot it there
set_size just saves the size and calls:
VS::get_singleton()->viewport_set_size(viewport, size.width, size.height);
which is enough
Viewports in Godot 3.0 have been simplified a lot, they are either the main viewport or a render target, so just a size argument should be enough.
For the reference, I just removed the obsolete code in 598724c04.
Wait... I don't understand that fully replaced the method "set_rect"? How can I solve the taskwhich was solved by "set_rect"?
Most helpful comment
Looks like the code was commented out when making the new renderer. That's a bug for me: either they should be re-implemented or removed if the function went to somewhere else.