I am trying to grasp the basic of using XML to load text into a game. I have the following in a file called test.xml.
<?xml version ="1.0" encoding="utf-8" ?>
I want to load “Hello, World!” into a text object named TextText in the first scene of the game.
Can anyone tell me how I can do that?
You have to check the GD xml syntax, try to use the storage actions and save the string “Hello, World!” in a file, you’ll see that the tags (attributes?) are a bit different
Then just load the string (again, with the storage actions) and save it into a variable:
(the post talks about web storage, it’s the same for native, but the filename is relative to the .gdg file in preview and relative to the compilation directory in the build).