Hi.
I'm currently working on an MMO and I ran into a bit of a problem. My server is made in Java using the Netty framework (netty.io) and the client is made in Unity3d (unity3d.com) using TcpClient and BigEndian versions of the C# BinaryReader/BinaryWriter. My heightmaps were made using World-Machine (world-machine.com) and exported as 16-bit RAW files.
Right now I'm loading the heightmaps into a bytearray via the Java server and sending it to the client, but I don't know how to use that array to create a heightmap (using Unity's TerrainData.SetHeights). Since bytes are per default unsigned in .NET the bytearray in the client is actually an sbytearray.
If anyone could lend me a hand on this or point me in the right direction it would be greatly appreciated and considered a personal favour. Thank you very much in advance.
TL;DR
I need to know how I'd turn the binary content of a 16-bit RAW heightmap into an actual heightmap on a Terrain using Unity.