Skip to content

Commit

Permalink
Fix child object recycling in custom objects (#6846)
Browse files Browse the repository at this point in the history
  • Loading branch information
D8H authored Aug 5, 2024
1 parent eaa0f40 commit d082d4f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion GDJS/Runtime/runtimeobject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,10 @@ namespace gdjs {
this.layer = '';
this._livingOnScene = true;
//@ts-ignore Reinitialize is like a constructor, it can overwrite the readonly property.
this.id = runtimeScene.createNewUniqueId();
this.id = runtimeScene
//
.getScene()
.createNewUniqueId();
this.persistentUuid = null;
this.networkId = null;
this.pick = false;
Expand Down

0 comments on commit d082d4f

Please sign in to comment.