mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
-Some changes to how scenes and scripts are overriden in scene instance and inheritance
-Fixes #3127 and also properly fixes #2958
This commit is contained in:
parent
6c27df8df6
commit
a74138a0dc
3 changed files with 49 additions and 5 deletions
|
@ -92,6 +92,22 @@ void ScriptServer::init_languages() {
|
|||
}
|
||||
}
|
||||
|
||||
void ScriptInstance::get_property_state(List<Pair<StringName, Variant> > &state) {
|
||||
|
||||
List<PropertyInfo> pinfo;
|
||||
get_property_list(&pinfo);
|
||||
for (List<PropertyInfo>::Element *E=pinfo.front();E;E=E->next()) {
|
||||
|
||||
if (E->get().usage&PROPERTY_USAGE_STORAGE) {
|
||||
Pair<StringName,Variant> p;
|
||||
p.first=E->get().name;
|
||||
if (get(p.first,p.second))
|
||||
state.push_back(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Variant ScriptInstance::call(const StringName& p_method,VARIANT_ARG_DECLARE) {
|
||||
|
||||
VARIANT_ARGPTRS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue