What is Metadata and how do I create it and use it for my games?

I head this term when I was looking for some ideas on how to make a rhythm game, and someone had posted and answer saying that one should create some kind of interface for creating tracks and something to store metadata for when the notes come in and where and stuff like that.

But I don’t understand what he meant by ‘Metadata’. What is it, exactly? I mean, googling it doesn’t really say much, basically information about another piece of information.

And I don’t know how one would store this in a file, but my best guess is that it would probably be in an xml-file or just a plain text-file.

Anyways, could you guys give me an example of some metadata, and I mean like text-examples, not just where you describe how it would work, but a piece of code that actually has something to do with storing metadata.

It sounds like in this case what was meant by metadata is a data format to match notes to timestamps in the song. So for example, that’d be a file that tells your game “At one minute and thirty seconds, spawn blue and yellow notes” The easiest way to deal with this would probably be to use Unity’s built-in JSON serializer to store this sort of data:

That’ll let you easily import/export the data to Unity. There’re examples on that page that show both how to save/load it and the format of a json file.

Another option might be to use a Scriptable Object to store that data:

There are also a number of assets on the store that’ll do this for you; you might want to look into Koreographer, for example: