public readonly void* GetRequiredComponentDataPtrRO<T>(ref ComponentTypeHandle<T> typeHandle);
public readonly void* GetRequiredComponentDataPtrRW<T>(ref ComponentTypeHandle<T> typeHandle);```
Been annoying me for a long time, but could we please change the return type from `void*` to `T*`?
It should be a non breaking change as you can pass `T*` to `void*` and anyone already casting `T*` will just get warned it's redundant.
All the other return by ptr methods already return the actual type not void
```cs
public readonly T* GetComponentDataPtrRO<T>(ref ComponentTypeHandle<T> typeHandle);
public readonly T* GetComponentDataPtrRW<T>(ref ComponentTypeHandle<T> typeHandle);```
API inconsistencies are frustrating and you get code that looks like this
```cs
var objectIds = (ObjectId*)chunk.GetRequiredComponentDataPtrRO(ref this.ObjectIdHandle);
var presentations = chunk.GetComponentDataPtrRO(ref this.VisualEffectPresentation);```
#GetRequiredComponentDataPtrX
1 messages · Page 1 of 1 (latest)