Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

NativeArrayUnsafeUtility.ConvertExistingDataToNativeArray

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

  1. Mese96

    Mese96

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

    jo-unity

    Unity Technologies

    Joined:
    Mar 27, 2019
    Posts:
    33
    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:
    40
    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:
    1,660
    Same here. I think the length is the number of elements in the array, contrary to what the documentation says (the size in bytes).
     
  5. jeremygillespiecloutier

    jeremygillespiecloutier

    Joined:
    May 28, 2020
    Posts:
    5
    +1, reported a problem with the page