How do I read a Raw Asset in code?

Hello,
How do I read a raw asset in code?
The Xenko.Core.Assets assembly is not even included with the NugetPackage, so I don’t have the RawAsset class.
What is the correct way to access a raw asset (e.g. a simple text file)?

Thanks in advance.

you can use OpenAsStream as described here:

1 Like

If you just need to fetch data from a text file you can just use File or FileStream from the System.IO class or some other similar method, Microsoft has plenty of documentation on these methods.

If you want to read it from the game’s asset package, then I cant help, it’s been a while since I worked with xenko and I dont remember it quite as well as I used to or as I would with Unity. If I wasn’t busy though I would research the xenko documentation for answers though