0 votes

https://ibb.co/tCQwPwx

This piece works individually.
If I save this as a .tscn file and
drag&drop it to another project,
I don't see anything of it.
But the two print statements show
the right one.
What is wrong?

Sorry for my bad english.

in Engine by (29 points)
edited by

Sicher, daß die Events/Signals richtig verknüpft sind? Das würde ich mal prüfen.
Du instanziierst diesen Progressbar in einem anderen Projekt in einer "Scene"?
Steht die Instanz am richtigen Ort? Ist der Parent der Instanz (der node wo das Ding eingehängt ist) auch sichtbar?

Dir ist auch bewußt, dass es auch eine fertige Progressbar Komponente in Godot gibt?

Problem gefunden.

func _ready() -> void:  
    breit = self.rect_size.x    
    $BG.rect_size.x =breit  
    $Bar.rect_size.x = breit    
    hoch = self.rect_size.y
    $BG.rect_size.y = hoch  
    $Bar.rect_size.y = hoch     
    print(rect_size,rect_position

rectsize ist immer 1,1 obwohl im Editor etwas vernüftiges
eingetragen ist.
rect
position dagegen stimmt mit dem Editor überein.

Warum denn das???
Stört mich ersteinmal nicht wenn ich die rect_size im code angebe geht es. Nicht schön aber ich will es ja nicht an andere weitergeben.

Ja es gibt eine ProgressBar aber die schneidet beim Bar oben einfach alles weg wenn es weniger als 100% sind. Meine Bar hat ei en 3D Effekt und es sieht doof aus mit dem weggeschneide.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.