In BZ, many of the rocks and other pieces of terrain have very roughly shaped colliders which are being used for placing items. This results in items which appear to be floating above the terrain, and isn't very pleasing. So, where possible, we instead use the mesh of the actual object.
Also moves state objects into a cache that is reloaded whenever the scene unloads, which fixes a bug where those state objects would be pointing to de-initialized objects.
Changes in this pull request
In BZ, many of the rocks and other pieces of terrain have very roughly shaped colliders which are being used for placing items. This results in items which appear to be floating above the terrain, and isn't very pleasing. So, where possible, we instead use the mesh of the actual object.
Also moves state objects into a cache that is reloaded whenever the scene unloads, which fixes a bug where those state objects would be pointing to de-initialized objects.