Browse Source

[prefab] Fix clone not copying shared scene

Clément Espeute 1 year ago
parent
commit
4bcb5df636
1 changed files with 2 additions and 0 deletions
  1. 2 0
      hrt/prefab/Prefab.hx

+ 2 - 0
hrt/prefab/Prefab.hx

@@ -164,6 +164,7 @@ class Prefab {
 		if( sh.currentPath == null ) sh.currentPath = shared.currentPath;
 		#if editor
 		sh.editor = this.shared.editor;
+		sh.scene = this.shared.scene;
 		#end
 		return this.clone(sh).make(sh);
 	}
@@ -184,6 +185,7 @@ class Prefab {
 				sh = new hrt.prefab.ContextShared(this.shared.currentPath, true);
 				#if editor
 				sh.editor = shared.editor;
+				sh.scene = shared.scene;
 				#end
 			}
 		}