mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 14:11:15 +00:00
Revive inspector property evaluation
GDScript was restricted to parse only scripts beginning with __res://__ or __user://__ to avoid templates from being parsed. I've made that a bit less inclusive by allowing scripts with an empty path to be parsed too, which doesn't conflict and is needed for this to work. Also I've removed the `this` variable of the generated script and made the relevant object to be the one the script instance refers to, so you can use `self` instead. Now, with the shorter 3.0-style syntax, you can write things like: `self.position.x + 10` Closes #9500.
This commit is contained in:
parent
6380975ee2
commit
ae2d449047
2 changed files with 3 additions and 4 deletions
|
|
@ -615,7 +615,7 @@ Error GDScript::reload(bool p_keep_state) {
|
|||
if (basedir != "")
|
||||
basedir = basedir.get_base_dir();
|
||||
|
||||
if (basedir.find("res://") == -1 && basedir.find("user://") == -1) {
|
||||
if (basedir != "" && basedir.find("res://") == -1 && basedir.find("user://") == -1) {
|
||||
//loading a template, don't parse
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue