Converting Sfs2X.Util.ByteArray to byte[] in C#

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

arronbbo
Posts: 1
Joined: 10 Mar 2020, 15:32

Converting Sfs2X.Util.ByteArray to byte[] in C#

Postby arronbbo » 10 Mar 2020, 15:36

Receiving an png from the server in the form of a byte array, would like to create a texture in unity using this png, as far as I know I will need to create a texture using a byte[], would like to know how to convert from the sfs byte[] so I may accomplish this, any help would be appreciated, thanks.
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Converting Sfs2X.Util.ByteArray to byte[] in C#

Postby Lapo » 10 Mar 2020, 16:54

Hi,
ByteArray.Bytes returns the byte[] wrapped by the object.

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Stevenor and 111 guests