Search Unity

NativeArrayUnsafeUtility.ConvertExistingDataToNativeArray

Discussion in 'Documentation' started by Mese96, Jun 12, 2019.

  1. Mese96

    Mese96

    Joined:
    Jul 23, 2013
    Posts:
    18
  2. jo-unity

    jo-unity

    Unity Technologies

    Joined:
    Mar 27, 2019
    Posts:
    30
    Hi! I'm from the docs team: what exactly is wrong with the info on this page?

    Also, feel free to click on the "Report a Problem With This Page" button you see on any documentation page: you can send your feedback direct to the team and we'll get around to fixing it.
     
  3. Mese96

    Mese96

    Joined:
    Jul 23, 2013
    Posts:
    18
    I think it was that the parameter "length" is not the length in bytes, but the number of elements.
    So not count * sizeof(T) but just count.
     
  4. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    637
    Same here. I think the length is the number of elements in the array, contrary to what the documentation says (the size in bytes).
     
unityunity