Ver código fonte

Allow disabling references

trethaller 6 anos atrás
pai
commit
deaa9b6546
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2 1
      hide/comp/SceneEditor.hx

+ 2 - 1
hide/comp/SceneEditor.hx

@@ -1140,7 +1140,8 @@ class SceneEditor {
 	}
 	}
 
 
 	public function setEnabled(elements : Array<PrefabElement>, enable: Bool) {
 	public function setEnabled(elements : Array<PrefabElement>, enable: Bool) {
-		elements = [for(e in elements) if(e.to(Object3D) == null) e]; // Don't disable/enable Object3Ds, too confusing with visibility
+		// Don't disable/enable Object3Ds, too confusing with visibility
+		elements = [for(e in elements) if(e.to(Object3D) == null || e.to(hide.prefab.Reference) != null) e];
 		var old = [for(e in elements) e.enabled];
 		var old = [for(e in elements) e.enabled];
 		function apply(on) {
 		function apply(on) {
 			for(i in 0...elements.length) {
 			for(i in 0...elements.length) {