title: H5Parser for Unity
body: <p>I try to find a way to read an H5 (HDF5) file into Unity.</p>
  <p>the file has the following structure:</p>
  <p><a href="https://i.stack.imgur.com/Digr7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Digr7.png" alt="enter image description here" /></a></p>
  <p>Where x/data/ looks like this: <a href="https://i.stack.imgur.com/G2OXq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/G2OXq.png" alt="enter image description here" /></a></p>
  <p>I tried this package: <a href="https://github.com/AdamBebko/UnityH5Loader" rel="nofollow noreferrer">https://github.com/AdamBebko/UnityH5Loader</a> but it's returning only arrays of 0 or for X/data/ some values that I can't explain where they are coming from. Here is the line of code that I was using and the result which doesn't make any sense to me.</p>
  <pre><code>float[] loadedFloatArray = H5Loader.LoadFloatDataset(&quot;Assets/Datasets/testhdf.hdf5&quot;, &quot;/X/data&quot;);
  </code></pre>
  <p><a href="https://i.stack.imgur.com/6L4Se.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6L4Se.png" alt="enter image description here" /></a></p>
  <p>I tried also to implement it myself but this isn't working either.</p>
  <pre><code>            long fileId = H5F.open(filePath, H5F.ACC_RDONLY);
  
              string dataSetName = &quot;/X/data&quot;;
              string longJoinedString;
              int stringLength;
  
              long datasetId = H5D.open(fileId, dataSetName);
              long spaceID = H5D.get_space(datasetId);
              long dataType = H5D.get_type(datasetId);
  
              int[] dimensions = GetDatasetDimensions(spaceID);
  
              stringLength = (int)H5T.get_size(dataType);
              byte[] buffer = new byte[dimensions[0] * stringLength];
  
              GCHandle gch = GCHandle.Alloc(buffer, GCHandleType.Pinned);
  
             //H5D.read(datasetId, dataType, H5S.ALL, H5S.ALL, H5P.DEFAULT, gch.AddrOfPinnedObject());
              //longJoinedString = Encoding.ASCII.GetString(buffer).ToString();
  
              H5D.read(datasetId, dataType, H5S.ALL, H5S.ALL, H5P.DEFAULT, gch.AddrOfPinnedObject());
  </code></pre>
  <p>Has someone any ideas?</p>