Hello weveryone!
I have a big problem with LoadSceneHierarchy, until one month ago I used LoadScene() method to change my scenes with this script:
this.app.scenes.loadScene(scene.url, function (err, scene) {
if (!err) {
oldHierarchy.destroy();
pc.ComponentSystem.initialize(scene.root);
pc.ComponentSystem.postInitialize(scene.root);
} else {
console.error(err);
}
});
And all works fine, with the new Engine Version this method failed and I change the code to this:
this.app.scenes.loadSceneHierarchy(scene.url, function (err, scene) {
if (!err) {
oldHierarchy.destroy();
} else {
console.error(err);
}
});
The scene change but exist several problems like my inputs stop to work or the ilumination is completely different when change between scenes…
I suppose that i need to “restore” this two lines:
pc.ComponentSystem.initialize(scene.root);
pc.ComponentSystem.postInitialize(scene.root);
The problem is that two lines return me an error that they aren’t a function…
Please give me a hand to fix this, I’m little desperate.
Thanks in advance guys!