-
Notifications
You must be signed in to change notification settings - Fork 9
Level builder
Last Update: 21/12/2017
As a level designer you should be interacting only with the Level Builder within Unity. This is made (and will be developed further) so that you have as little interaction with the Unity Editor as possible to avoid errors.
To open the Level Builder: open the Unity application -> Hover over the Level Builder tab in the navigation menu and press "Open". This will open the Level Builder tab either in a window or somewhere embedded within the editor. Feel free to position this anywhere by dragging the "Level Builder" tab above the window.
At this stage you can select a Level to work on from the drop down menu and this will load the scene automatically.
Then you have the options to change the terrain size, create a new level, view pickups or view obstacles.
To insert an obstacle or pickup, press the button and double click on the desired game object.
To shift elements correctly across the grid: Hold the CTRL button (or equivalent) and drag one of the three xyz arrows on the game object.
The editor code is not combined with the game code. They are in two different namespaces. You can find the source code in the Assembly-CSharp-Editor project at path Editor/LevelBuilder.
The top level GUI code is located in the LevelBuilderWindow.cs file of the GUI folder. The current architecture splits each section into Menus and then we Display each menu at all OnGUI calls from LevelBuilderWindow. This in turn calls the inner Display() methods of each menu.
Loading / Changing Levels: When the level designer selects a level from the drop down menu, we mark all scenes in Unity dirty and then save the open scenes. This has to be done because Unity3d does not recognize changes done directly by the scripts in the Level Builder, so no changes will be saved otherwise. We make sure the Main scene cannot be modified.
Naming Conventions: Level appended by index, starting at 1.
