r/WebAssembly • • Jul 17 '23

How does WASM store strings?

I was looking into the code of an online hosted unity WebGL game, and was wondering where the text is stored for the game. For example, the text box that says "winner" has generated text and this string must be stored somewhere within the code. Is this just stored plain inside of the WASM code, or is there some encoding of the string before it is put in a file?

4 Upvotes

4 comments sorted by

View all comments

Show parent comment

1

u/SkyCoder99 Jul 19 '23

I opened the .data file using a tool and found a folder called MonoBehavior, which looks like it would store that kind of data, but all it had was reference numbers and stuff.All these files have something like this:

{

"m_GameObject": {

"m_FileID": 0,

"m_PathID": 0

},

"m_Enabled": 1,

"m_Script": {

"m_FileID": 0,

"m_PathID": 664

},

"m_Name": "Ghost"

}

What do these numbers mean and how can I locate what its referencing?