Procházet zdrojové kódy

[scene] Reference properly clean itself when removed from scene

Clément Espeute před 11 měsíci
rodič
revize
59ec6f4cf5
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  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) {
 		var props = ctx.properties.add(element, this, function(pname) {
 			ctx.onChange(this, pname);
 			ctx.onChange(this, pname);
 			if(pname == "source" || pname == "editMode") {
 			if(pname == "source" || pname == "editMode") {
+				editorRemoveObjects();
 				refInstance = null;
 				refInstance = null;
 				if (hasCycle()) {
 				if (hasCycle()) {
 					hide.Ide.inst.quickError('Reference to $source would create a cycle. The reference change was aborted.');
 					hide.Ide.inst.quickError('Reference to $source would create a cycle. The reference change was aborted.');