Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | HarpyEagle | |
Old Version | Published before Godot 3 was released. |
In GDScript using the self
keyword to access a member variable is optional. However I often prefer to include it for readability - it makes variables which belong to the object’s scope stand out. However, I am wondering if using self
has a performance penalty. While I am sure it must be small, I’d like to know in case I am writing code that has to execute many times each frame (e.g. very frequently used functions).