Feedback: set BG texture via a tool script; parallax BG vs canvas layer sprite

When the Sprite_2D’s texture is modified via @export variable in the inspector, this change is not reflected in the editor. It only becomes visible when the game is run.
This approach hides changes made and is generally not a good workflow, as it would be unclear for a third party (or the user after some time) looking at the project why there are difference between what the editor shows and how the game looks. Additionally, when the variable is set to the same texture that is already set in the instantiated scene, this code is completely redundant.
On the one hand this begs the question on why a nested scene is used here at all as it obscures the access to the background’s texture property and increases complexity unnecessarily.
Now, there would be a good reason to use this approach here - making use of a tool script. A tool script can detect changes made in the inspector and execute code to update the editor as soon as the exported variable is changed. This would not only make the changes made by the user visible, it would even allow for the animation of the background to be run in the editor.

Another bit of feedback I’d like to give is on the use of the ParallaxBackground node here. It is true that parallax scrolling is a very common effect used in 2D videogames. However, the way the node is set up here has nothing to do with this effect. There are neither multiple parallax layers, nor does the background scroll with the character’s/camera’s movement.
I really don’t mean to be harsh about this, but using this node here and in this way not only fails to teach users to set up an actual parallax background, but it also shows a much too complicated approach for a simple scrolling background texture.

2 Likes

sorry i missed the post, cheers for the feedback, ill pass it onto the team :+1:

This makes a lot of sense, thank you

1 Like

Privacy & Terms