Hi.
This is the code I`m using to load and run a new scene:
onButtonClicked(){
cc.director.loadScene("scene2", function(_scene){
cc.director.runScene(_scene);
});
}
I expect the scene to load and run when I click a button, In the properties of the button I have added a callback to this method as described here:
https://docs.cocos.com/creator/manual/en/components/button.html
The preview in the browser and when I build a web application works fine.
But when I build a native macOS application, the moment I click the button the app freeze.
the reason I believe it is freeze is because the button continue displaying the pressed animation forever and nothing is happening, I am not able to press any other buttons after in the app.
In the build properties I have selected to include all the scenes.
I get a notification the app is from an unknown source but I click ok, so the app launch.
My AV complain the app is trying to modify a file but I click allow and so the app continue to run.
The moment I click a button, the button display the pressed animation and the app freeze, I get no messages.
Is there anything else I could try? What could possibly cause this issue if it works in the browser but freeze in the native build?
Is there any way I could debug the app and get it display any errors?
I have created a project in case someone would like to see exactly how the project looks like:
SceneManagerTest.zip (847.0 KB)
I would appreciate any help.
Thanks.