Most people that use my Steamworks library only want to do a few basic things. One of those is showing an avatar.
The simple answer is:
- Grab this component.
- Put it on a RawImage.
If you want to set the SteamID dynamically you need to do something like:
The manual way is basically just looking at the above component and seeing what it does.
Request The Avatar
What’s in the Image
- Width + Height– size of the image in pixels
- Id – Steam’s internal image id (not Steam Id)
- Data – array of bytes, 0-255 representing the colours.
- GetPixel( x, y ) – convenience function, lets you get the Color of a pixel at x, y
You can manually read from Data if the convenience class is too dumb for you and you want to do something smarter.
The data is laid out RGBA. Here’s how GetPixel reads a pixel.