I am having an array of structures that I want to be able to abstract behind a helper class. I want to be able to create a way of referencing the instance of the structure inside of the helper class in a way that the reference will always be valid as long as that instance is alive.
What im looking for is a helper class with an interface for Adding and Removing and a way of changing the data of an instance in a way that I can make sure that the index or what ever I use to find the instance, always is the same instance.
Simply using an index to reference the instances does not work as it will break as an instance of the structure is removed.
I can not make pointers, as there is no way of returning a pointer to a structure in c# as far as I know?
Hash tables are out of the question as well as I need a pure array in order to pass the data to the gpu.
Im not sure if I explained myself very well here, but hopefully someone will understand what I am looking for.