This is something that I noticed when I set an exported TextureButton on my script. At the begining I thought I forgot to save the project before closing. Then I set again the value and this time I made sure I saved the project before closing it.
Oddly enough this only happens on my project, I tried with the GDQuest's sample project and its not happening. This makes me think I'm doing something wrong which is causing the issue.
Having this said, I made a bit of research trying to find a "pattern" to discover when this happens without success because it always happens. This were the tests:
Tried with default null value.
@Export
@RegisterProperty
var myTextureButton: TextureButton? = null
Tried with lateinit var
@Export
@RegisterProperty
lateinit var myTextureButton: TextureButton
Tried with a Double var with default value
@Export
@RegisterProperty
var myDoubleValue: Double = 2.0
Setting the script on a new scene.
Setting the script on a node whicih is embedded on another scene.
Setting the script on a node which is not embedded on another scene.
All of them were exported correctly into de Godot's inspector and I was able to change its value. Everything works fine until I save the scene, close the project then open it again.
I'm using IntelliJ IDEA 2024.1.3 (Ultimate Edition) with the plugin version 0.9.1-4.2.2 and the latest Godot build v4.2.2.stable.custom_build [15073afe3] (0.9.1-4.2.2) which was released on May 7.
This is something that I noticed when I set an exported
TextureButton
on my script. At the begining I thought I forgot to save the project before closing. Then I set again the value and this time I made sure I saved the project before closing it.Oddly enough this only happens on my project, I tried with the GDQuest's sample project and its not happening. This makes me think I'm doing something wrong which is causing the issue.
Having this said, I made a bit of research trying to find a "pattern" to discover when this happens without success because it always happens. This were the tests:
Tried with default null value.
Tried with lateinit var
Tried with a
Double
var with default valueSetting the script on a new scene.
Setting the script on a node whicih is embedded on another scene.
Setting the script on a node which is not embedded on another scene.
All of them were exported correctly into de Godot's inspector and I was able to change its value. Everything works fine until I save the scene, close the project then open it again.
I'm using IntelliJ IDEA 2024.1.3 (Ultimate Edition) with the plugin version 0.9.1-4.2.2 and the latest Godot build v4.2.2.stable.custom_build [15073afe3] (0.9.1-4.2.2) which was released on May 7.