1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Changed logic and optimized ObjectID in ObjectDB and Variant, removed RefPtr.

This commit is contained in:
Juan Linietsky
2020-02-13 16:03:10 -03:00
parent 53cf289f30
commit 867d073b98
51 changed files with 446 additions and 573 deletions

View File

@@ -854,7 +854,7 @@ void CSharpLanguage::reload_assemblies(bool p_soft_reload) {
while (script->instances.front()) {
Object *obj = script->instances.front()->get();
obj->set_script(RefPtr()); // Remove script and existing script instances (placeholder are not removed before domain reload)
obj->set_script(REF()); // Remove script and existing script instances (placeholder are not removed before domain reload)
}
script->_clear();
@@ -877,7 +877,7 @@ void CSharpLanguage::reload_assemblies(bool p_soft_reload) {
// Use a placeholder for now to avoid losing the state when saving a scene
obj->set_script(scr.get_ref_ptr());
obj->set_script(scr);
PlaceHolderScriptInstance *placeholder = scr->placeholder_instance_create(obj);
obj->set_script_instance(placeholder);
@@ -1003,7 +1003,7 @@ void CSharpLanguage::reload_assemblies(bool p_soft_reload) {
CRASH_COND(si != NULL);
#endif
// Re-create script instance
obj->set_script(script.get_ref_ptr()); // will create the script instance as well
obj->set_script(script); // will create the script instance as well
}
}