Obstacle Generator
The obstacle generator (Reffered to as the 'LevelGenerator' in the code), is responsible for the creating and saving of obstacles that would appear while playing the game; however, the generator itself doesn't create obstacles, but simply saves all the objects within the editor to a given obstacle ScriptableObject.
It can do the following:
​
-
Save an obstacle
-
Saves the positions of all saveable objects currently on screen, and within the given bounds of the obstacle grid. This information is saved to an 'Obstacle Scriptable Object'. ​
-
Also saves information of all spaces within the bounds of the grid that don't contain an object, so that a collectable may be spawned their during gameplay.
-
-
Load an Obstacle
-
Loads all objects from a previously saved 'Obstacle Scriptable Object', so that it may be viewed and edited.​
-
-
Clear an Obstacle
-
Destroys all the saveable objects currently existing in the editor scene.​
-
Obstacle Generator Code



Obstacle Generator Editor Code

Obstacle Code

Obstacle Info Code

Saveable Object Code

Saveable Object Info Code

Saveable Object Prefab Code
