When I issue a “storyboard.gotoScene( “scene1”, options )” from already within the same scene, the options I pass as the 2nd parameter are not becoming available at all within didEnterScene?
This would appear to be a bug correct?
Background: So example would be using want to jump from one game level to another game level directly. So don’t want to have to go back to the level selection screen, but merely go straight back into the same game scene, passing the level number as a parameter within the options.
So for example if issuing from within the scene:
local options = { params = {data = "Test 123"} } storyboard.gotoScene( "scene1", options )
Then within enterScene I have:
function scene:enterScene( event ) -- MODIFIED TO SHOW ISSUE print("enterScene - event.params", event.params)
The output is:
enterScene - event.params nil
As an example I modified the main.lua and scene1.lua files from the Corona SampleCode/Interface/Storyboard app. Files attached.
QUESTIONS:
a) Is this a bug?
b) If yes, is there an indication when it will be fixed?
c) If yes, what would be the best work around in the meantime?
d) If no, why not, for my understanding? How then would one typically restart the same level with some different input then?
Thanks