loadSceneSettings() error Launch from Editor

Hey there.

Launch from Editor,
Application.loadSceneSettings() callback has error.
http://developer.playcanvas.com/en/api/pc.Application.html#loadSceneSettings

Fix this issue below.

launch.js

    SharedSceneSettingsHandler.prototype = {
        load: function (url, callback) {
            var id = parseInt(url.replace(".json", ""));
            if (typeof(id) === "number") {
            // skip...
        },

to

    SharedSceneSettingsHandler.prototype = {
        load: function (url, callback) {
            var id = parseInt(url.replace("/api/", "").replace(".json", ""));
            if (typeof(id) === "number") {
            // skip...
        },

like SharedHierarchyHandler.

Please modify this.

Could you please provide a simple project example link to replicate an issue?

This is test project.
https://playcanvas.com/project/468978/overview/load-scene-settings

Press enter key, then call Application.loadSceneHierarchy().
Press space key, then call Application.loadSceneSettings().

test procedure

  1. Press enter key. (Call loadSceneHierarchy())
  2. Press space key. (Call loadSceneSettings())

Then display error below.

Could not subscribe:
loadSceneSettings

Thank you for sharing example and replication case. We’ve replicated issue, and fixed Launcher to replace URL as you’ve suggested. But there are some other problems related to applying scene settings, and will have to ask @dave with that as it is are of code.

I personally don’t like whole scenes stuff at all and avoid using it.

1 Like

I will use your advice as reference.

Thank you.