-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
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
Best practices godot interfaces #6831
Best practices godot interfaces #6831
Conversation
@export var const_script: Script: | ||
set = set_const_script |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@export var const_script: Script: | |
set = set_const_script | |
@export var const_script : Script: | |
set = set_const_script |
Looks all good except this one. This seems pretty hard to read to me, not sure how to improve it. And should there be a space before the type for consistency, like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style guide doesn't mention space between variable and colon <variable>: <type>
but i'm not sure in this case with set/get.
Updated setter from @export var const_script: Script:
set = set_const_script
func set_const_script(value):
if Engine.is_editor_hint():
const_script = value to @export var const_script: Script:
set(value):
if Engine.is_editor_hint():
const_script = value |
This PR was unfortunately superseded by #7640. I'm sorry we missed the duplicate. |
Update one code block in Godot Interfaces