From d082d4f5a4ee97eadd0055ca2d15320595272986 Mon Sep 17 00:00:00 2001 From: D8H Date: Mon, 5 Aug 2024 10:08:58 +0200 Subject: [PATCH] Fix child object recycling in custom objects (#6846) --- GDJS/Runtime/runtimeobject.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GDJS/Runtime/runtimeobject.ts b/GDJS/Runtime/runtimeobject.ts index ef75641c71af..371cf8d08a17 100644 --- a/GDJS/Runtime/runtimeobject.ts +++ b/GDJS/Runtime/runtimeobject.ts @@ -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;