Creating an asset from script?

Hi, I’m new to Unity scripting ( using C# ) and have a quick question:

I’d like to create some custom data that gets saved out as a resource or asset, that I can then load back in later on. The asset creation code will only be run once on my end to generate the custom chunk of data and save it to a file. Then, the actual game code run by the user will read in that data and use it.

What’s the best approach for doing this? Thanks in advance!

If you want to write your data to a file you can do that as answered in this question:

To properly answer your question some more detail would be nice. Perhaps the solution you are looking for is not ideal and someone could suggest a better path for you with more details.