How to make some properties of sub node configurable for each instance in a clean way, updating the 2D editor view as well?
I have just started learning Godot (using Version 4.1.1 stable mono.official (bd6af8e0e) )
I think I have a basic question.
I am trying to make a 2d platformer game.
Currently I am working on a Scene (for the walls and floors) which is configured like this:
RegidBody2D
TextureRect
CollisionShape2D
The TextureRect has it's stretch mode set to Tile. (because I want to have larger walls and floors)
What I want is to be able to set this size per instance.
You could do this by setting Editable children, but then you get clutter, because you can change every little thing on every instance. Which I don't want.
So I tried it with @export, with a script for the scene (set on RigidBody2D)
It has 2 @export variables, which then resize the width of the textureRect inside of the _ready() function.
But then it did not update the preview inside of the 2D view.
To fix this, I added @tool at the top, but it's not up to date.
Is there a simple way to just make some properties configurable, or maybe do it via @tool script, but then keep the 2D view up to date, or maybe force the _ready() script to rerun for the 2D view ( tool )?
Thanks