Sfoglia il codice sorgente

[scene] Reference properly clean itself when removed from scene

Clément Espeute 11 mesi fa
parent
commit
59ec6f4cf5
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      hrt/prefab/Reference.hx

+ 1 - 0
hrt/prefab/Reference.hx

@@ -212,6 +212,7 @@ class Reference extends Object3D {
 		var props = ctx.properties.add(element, this, function(pname) {
 			ctx.onChange(this, pname);
 			if(pname == "source" || pname == "editMode") {
+				editorRemoveObjects();
 				refInstance = null;
 				if (hasCycle()) {
 					hide.Ide.inst.quickError('Reference to $source would create a cycle. The reference change was aborted.');