Skip to content

Commit

Permalink
Keep hierarchy for unmade reference
Browse files Browse the repository at this point in the history
  • Loading branch information
SpiraTom committed Mar 29, 2024
1 parent 20bdb9e commit 72f0455
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hrt/prefab/Reference.hx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ class Reference extends Object3D {
#if editor
try {
#end
return hxd.res.Loader.currentInstance.load(source).to(hrt.prefab.Resource).load().clone();
var refInstance = hxd.res.Loader.currentInstance.load(source).to(hrt.prefab.Resource).load().clone();
refInstance.shared.parentPrefab = this;
return refInstance;
#if editor
} catch (_) {
return null;
Expand Down

0 comments on commit 72f0455

Please sign in to comment.