Search Unity

[RESOLVED] ComponentDataArray and ComponentDataFromEntity for the same component type?

Discussion in 'Entity Component System' started by Mr-Mechanical, Nov 21, 2018.

  1. Mr-Mechanical

    Mr-Mechanical

    Joined:
    May 31, 2015
    Posts:
    507
    I'm trying to use a ComponentDataArray and ComponentDataFromEntity for the same component type in the same job. Is this something allowed?

    I am getting this error: "InvalidOperationException: The writable NativeArray SomeJob.componentDataFromEntity is the same NativeArray as SomeJob.componentDataArray, two NativeArrays may not be the same (aliasing)."

    Edit: used entityarray to solve this
     
    Last edited: Nov 22, 2018