Godot Version
4.2.1.stable
Question
Hello! I’m reluctant to save each function in separate scripts because, as I understand, in order for your function in this separated script to work they have to have onready vars, use get_node, or something like that, otherwise the script doesn’t recognize the $sprites, $buttons, etc. The problem is that I have many many sprites and many many buttons and applying this for each individual node would be abysmal.
All I want is a way to store a function, within the same script, as something like: the function only costs 1 line in your editor, but if you open it up the code is all there. But not like folding because the editor still processes those lines, consuming CPU resources. I want something like: the folded functions to be set aside and not be checked all the time.
Why all of this? For 1 simple reason only: I researched on google and apparently after many many lines, like 10k, the editor starts to lag. My code is approaching 3k and is starting to not feel as responsive. I estimate the end code will have something like 9-10k lines. I don’t want to move the code to other scripts, I just want to keep the folded function crystallized so the editor doesn’t lag.
Is it possible? I just want the editor to not lag, I’m fine with the scene having 10k lines of code (I know the reasons programmers hate to do that but for my project it’s working fine).
Thanks for the help!