I am trying to make make changes to an old playcanvas code base that which make use of following pattern often.
Its seems no longer working. Is there any by chance an update to api caused this issue.
// Expose prototype methods and create a default tween manager on the application
(function() {
debugger;
// Add pc.Application#addXYZ method
pc.Application.prototype.addXYZ = function() {
};
var application = pc.Application.getApplication();
if (application) {
application.addXYZ(); //Thows undefined
}
})();
I tested
pc.Application.getApplication() instanceof pc.Application
Looks like returning false.
Please help