We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.4.4.stable.official
Windows 10
The title pretty much explains it.
This works is debug but not in release:
extends Node2D onready var icon = $Icon as Sprite func _ready() -> void: icon.modulate.a = false
However if you don't declare and simply assign it, you do get the error of assign type bool to an alpha color.
extends Node2D func _ready() -> void: $Icon.modulate.a = false
I don't know what is intended, if this should fail or not, but it should at least be consistent in both debug and release.
I have attached a simple project .zip with a windows release build in its project folder.
ModulateAlphaWithBool.zip
The text was updated successfully, but these errors were encountered:
Can you reproduce this on 3.5.rc4? Type information is now included in release builds, so this kind of typing discrepancy between release_debug (editor) and release builds should be gone now.
release_debug
release
Sorry, something went wrong.
Yes it works in 3.5.rc4. Thanks!
However, it highlights a difference when writing gdscript in general, should it throw an error when you don't declare it and work fine if you do?
onready var icon = $Icon as Sprite func _ready() -> void: # Works icon.modulate.a = false # Gives error $Icon.modulate.a = false
Or should we just convert the type in script int(false), and avoid these little things? Just incase Godot under the hood doesn't just do it for you.
int(false)
No branches or pull requests
Godot version
3.4.4.stable.official
System information
Windows 10
Issue description
The title pretty much explains it.
This works is debug but not in release:
However if you don't declare and simply assign it, you do get the error of assign type bool to an alpha color.
I don't know what is intended, if this should fail or not, but it should at least be consistent in both debug and release.
Steps to reproduce
I have attached a simple project .zip with a windows release build in its project folder.
Minimal reproduction project
ModulateAlphaWithBool.zip
The text was updated successfully, but these errors were encountered: