An indexed map cache. Used to temporarily store objects and functions. For example, a raycast callback function to be called, once we get the result from the physics backend. Indices can be freed and re-used.
Store an element in the cache. Will return one of the freed indices, or a new one.
An object or a function to store in the cache
Clears the cache from all elements and indices.
Frees an index to allow a re-use of it in the future.
An index to free. Once freed, the index might be used again.
Retrieves a stored element under the given index.
An index of the element to retrieve.
An indexed map cache. Used to temporarily store objects and functions. For example, a raycast callback function to be called, once we get the result from the physics backend. Indices can be freed and re-used.