[Feature Request] Read and write from type index (I am a big boy, I can handle the responsibility)

The methods:
Chunk.GetDataArrayReinterpret<T>(int typeindex, int expected_size)
EntityManager.SetIComponentDataReinterpret<T>(Entity e, int typeindex, int expected_size, T value)
EntityManager.AddIComponentDataReinterpret<T>(Entity e, int typeindex, int expected_size, T value)
EntityManager.GetIComponentDataReinterpret<T>(Entity e, int typeindex, int expected_size)

4 Likes

Let’s make some more noise.

1 Like

I would also need this. And while we are at it i’d like to have the same kind of API for DynamicBuffers too. DynamicComponentTypeHandles don’t even exist for Buffers yet. This would reduce the Code for my UtilityAI massively.

1 Like

Yes please! I once played around with modifying the internal libraries to expose this kind of functionality, but I would definitely prefer if there could be some kind of exposed API for this, even if it’s deemed as “unsafe access”.

1 Like

+1 for SetComponentDataRaw. Would like to set a component’s value using ComponentType or TypeIndex. It would also be nice if EntityCommandBuffer.UnsafeSetComponent was exposed.