I have a main camera view looking down on a 3 x 3 grid of plane prefabs(2d representation). The planes themselves are used to spawn procedural generated objects onto. The camera uses the floating origin script off the wiki therefore it is not held at the origin but never strays too far from the origin to prevent imprecision I found when I went above 5000 from the origin.
Therefore, the view is like this:
NW Plane - N Plane - NE Plane
W Plane — C Plane - E Plane
SW Plane - S Plane - SE Plane
My aim is to keep planes always spawned around the player. Therefore, if the camera moves far to the east I need to destroy the west planes (some/all) and then replace them with more planes in the east. By doing this the player will always have a the 3 x 3 plane grid in view.
I can spawn the objects on the plane, and destroy the prefab them depending on the distance from the camera but I am having a real ‘writer’s block’ on how to actually implement the loading of the planes. Any ideas are gratefully received - I am well aware I am missing the obvious here but sometimes you just reach something you can’t see!