EDIT: The solution, thanks to GilCat is:
For IBufferElementData you should use BufferFromEntity
Hello,
I have a job where I need access to an array of float3. I can use ComponentDataFromEntity for IComponentData, however when I attempt to do so for an IBufferElementData I get a error:
public ComponentDataFromEntity LanePointsFromEntity;
public struct LanePointsComponent : IBufferElementData
{
public float3 value;
}
The “LanePointsComponent” is underlined in red and states: “The type ‘LanePointsComponent’ cannot be used as a type parameter ‘T’ in the generic type or method ‘ComponentDataFromEntity’. There is no boxing type from LanePointsComponent to iComponentData”
Which, okay, I get. So… what is the answer? Can I, or should I include this type as part of another component:
ie:
public struct ConnectionDetails : IComponentData
{
public int ConnectionIdentity;
public int LaneIdentity;
public LanePointsComponent LanePoints;
}
Thanks kindly for any info.