Giter Site home page Giter Site logo

Comments (2)

KoBeWi avatar KoBeWi commented on June 28, 2024 1

Indeed, this is caused by default values being stored in the scene for Node properties. This was already reported and will be fixed in beta2: #91591

from godot.

graydoubt avatar graydoubt commented on June 28, 2024

This may be related to how the .tscn files are stored in 4.3.

In Godot 4.2, the main.tscn would contain:

[gd_scene load_steps=2 format=3 uid="uid://d1bdwhmo0dn6f"]

[ext_resource type="PackedScene" uid="uid://bkucqgqglk6k1" path="res://ui.tscn" id="1_aniqm"]

[node name="Main" type="Node"]

[node name="UI" parent="." instance=ExtResource("1_aniqm")]

But in Godot 4.3, the main scene file redundantly stores the same properties already defined in the ui scene file:

[gd_scene load_steps=2 format=3 uid="uid://d1bdwhmo0dn6f"]

[ext_resource type="PackedScene" uid="uid://bkucqgqglk6k1" path="res://ui.tscn" id="1_aniqm"]

[node name="Main" type="Node"]

[node name="UI" parent="." node_paths=PackedStringArray("my_button", "my_label", "my_label2") instance=ExtResource("1_aniqm")]
my_button = NodePath("Button")
my_label = NodePath("Label")
my_label2 = NodePath("Label2")

It appears that this is why the setters are called twice. If the setter does any heavy work, it will perform it twice. If it connects signals, it'll try to connect them twice. This seems like a regression.

The full debug output from the MRP is:

<CanvasLayer#28571600128>: setting button path
<CanvasLayer#28571600128>: setting int
<CanvasLayer#28571600128>: setting string
<Button#28588377345>: setting icon
UI:<CanvasLayer#28571600128>: setting button
UI:<CanvasLayer#28571600128>: setting label
UI:<CanvasLayer#28571600128>: setting label2
UI:<CanvasLayer#28571600128>: setting button
UI:<CanvasLayer#28571600128>: setting label
UI:<CanvasLayer#28571600128>: setting label2

from godot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.