Good day guys. I need help on the following issue…
I have saved the game control keys to a file (eg controls.json). There is a Game scene which reads this controls.json file and displays the current keyboard controls to the user. Problem is when the user changes these settings during game run time, the control.json is overwrited successfully but the game does not reload the file in the RAM so the new settings are read. The Scene will continue displaying old controls until the game has been closed and reopened for it to read the updated controls.json.
Is there a way in which the game can quickly update the overwitten file so that the new settings are displayed without closing the game first using Haxe code.
Hope my problem is clear. To those who wish to test a similar issue create a canvas that reads input text from the user and writes to a json file. Create another Scene which will be loaded after the user submits the Inputed text and that Scene must display what the user wrote to that file in the previous scene. You will notice that during runtime, before reloading the game, the reading Scene will display nothing. But after closing and opening the game, it will now read the true file state. How can I quickly read the overwitten text without closing the game in Haxe code.
Thank you in advance