Cyber Hook

Cyber Hook

Not enough ratings
How to use the Beta Level Editor
By colebob9
How to create things like buttons, cubes, etc in the level editor, an overview of each prefab, and how to change certain aspects of them. Plus, some tips on using the editor.
   
Award
Favorite
Favorited
Unfavorite
Introduction
This guide will have assumed you have read this guide by the devs. I will also assume that you know how to navigate Unity roughly. I won't be explaining how Unity works, mostly the specifics that apply to Cyber Hook. There are plenty of great tutorials around to teach you that stuff.

These are my findings from using the editor myself. I consider myself to be a Unity newbie still, so if there's a better way to do something, let me know.

Be aware that this is mostly the extent of what the editor is capable of at the moment. Anything custom will not be included when uploading to the workshop. (Ex: animated blocks, custom scripts, etc.)

Please note that this guide was written when the Level Editor was still in beta. (Still is as of writing.) Things may change in the future.

If you want to learn more about how levels are made, check out the included levels from the game (located in Assets > Scenes > Levels) and see how the devs designed their levels! You can learn a lot from just observing what they did to create them.
Creating your level
This was briefly went over in the dev's post, but I think it's worth going over more if you were confused by it.

Default level
The "BaseLevel" is the level that the editor should put you in by default. This is a great starting point for a level as it includes everything necessary for a complete level. (Player, starting platform, end door, necessary game logic, etc.)

If you are loaded in another scene, it is located in "Assets > Scenes > Levels > Default > BaseLevel".

Saving your level
Having this default level is great, but you don't want to save over this template as you want to come back to it if you want to create another level and so you don't lose your level when the editor gets updated.

Before making any changes to this scene, go to "File > Save As...", then save the scene where you want it. Personally, I create a folder within the project and put it under "Scenes > Levels > CustomFolder > CustomScene", replacing the custom names with what you want. (Trying to keep the structure of the game's files to not make it confusing)

You can also accomplish this by right-clicking the top-most name in the Hierarchy panel, then selecting "Save Scene As"
Snapping
In-depth documentation:
https://docs.unity3d.com/2019.4/Documentation/Manual/PositioningGameObjects.html
https://docs.unity3d.com/2019.4/Documentation/Manual/GridSnapping.html

Grid Snapping
Before you start placing down objects, you should enable grid snapping. This is very helpful to have enabled when placing blocks next to each other, when building more complex structures, or simply when you want to line up something easily.

To enable grid snapping, select your Move tool, then look to the top-left of the editor and click the button that currently says "Local" to change it to "Global". Then, to the side of the "Global" button, click the button that looks like a grid and a magnet to enable grid snapping.

There may be times where snapping is not ideal to use. Simply click on the grid snapping button again to disable it.

Now, whenever you move objects around, it should snap to each increment of space, instead of moving smoothly. If you want to change these values, click on Edit, then "Grid and Snap Settings...". This should open up a menu that will adjust certain behaviors of the grid. Look to the documentation for more on this.
Cubes
Every level in Cyber Hook is created with a ton of cube objects. By knowing how to use them, you can make most of a level from there.

Cube Prefab
Prefab name: _internal_cyberhook_cube_prefab_

Creating a cube is as simple as dragging it into your scene. By default, it is a "Normal" blue cube.



Select your cube object. There are 4 main types of cubes to choose from under the "Type" dropdown under the "Cube Material (Script)" section of the Inspector. Selecting a type will change the look and attributes of the cube.

  • Normal - A blue cube that is able to be grappled.
  • No Hook - A yellow cube that cannot be grappled.
  • Kill - Similar to the Normal cube, but kills you on contact. Purple colored.
  • Kill_No Hook - Combination of the Kill and No Hook blocks. Red colored.

You can also change the Shader for any of these types to "Transparent" to make it able to be passed through, and changes the look to be transparent as well.

Breakable Cubes
Prefab name: _internal_cyberhook_cube_breakable_prefab_

There are also the green Breakable cubes, but they have their own prefab to use. Using the normal cube prefab will not allow you to create breakable cubes.

There are a few more variables that this prefab has, but the only one you really have to worry about is "Starting Hit Points". Like the name suggests, it is how many times the cube needs to be shot in order to break.
Cube Customization
Original cube for reference:
You can also change the following variables in the Inspector to change how the cube looks.

X coords affects the left and right. Y coords affect the horizontal sides of the cube for up and down. Z coords affect the vertical sides of the cube for up and down. (Play with it to see what I mean.)







Border Range - Affects how the borders of the cube stray from the edges.







Corner Range - Affects the size of the corner triangles.







Corner Padding - Affects where the corners are positioned on the cube.
Buttons / Crystals
Heathy in the Discord server made a video detailing how to do this if that's more your speed. https://streamable.com/oryuce


Prefab name: _internal_cyberhook_button_

In this example, I will show how to hide and show cubes using a button. This should work with any type of cube you want to use.


1. First, grab a button and a cube prefab.

Each called:
_internal_cyberhook_button_
_internal_cyberhook_cube_prefab_





2. Click on the cube that you want to interact with the button. In the Inspector for the cube, change the shader to be "Cutout" (Under "Cube Material (Script)" ).

In the same Inspector panel, click "Add Component" and search for "Material Fader". Add the script and make sure the "Auto Display" box is checked.

(Note: The "Cutout" slider is optional and will be set to 0 when the game is loaded. It shows how the cutout shader works and the progress of the animation. I tend to put it to 0 anyways.)





3. Click on the button. (Make sure you don't select any part of the inside of the prefab.)

Under the section "Level Crystal (Script)". Click on the + button for the "On Activate {}" section. Find your cube in the Hierarchy panel on the left and drag the cube into the "None (Object)" box, which is underneath the dropdown menu titled "Runtime Only".

Click on the dropdown menu that currently says "No Function", then select "MaterialFader > Hide ()".

What we now set up is when the button is triggered, it triggers the MaterialFader script that we previously added on the cube object. In this case, we are using the Hide function to hide the cube. (Duh.)

If you want the button to have a timer to have the button deactivate after a period of time, set the "Timer" variable to how long you want in seconds. The button will turn back to green and trigger the "On Deactivate {}" section when the timer is up. (-1 is default and is for keeping the button pressed forever.)

If you want something to happen when the timer is up, you should also fill in the "On Deactivate {}" section. It can be filled in the same way that the "On Activate {}" section was. (See above.) If you want your cube to come back when the timer is done, use the "MaterialFader > Show ()" function.

4. You're done! Make sure to test it out by playing the level!
Propulsion Zones


Prefab name: _internal_propulzone_

You can affect the length of the zone by adjusting the Z Scale value.



Variables
If you want to change the behavior of the propulsion zones, you can use these variables. These variables are things that you can get a feel for more while playing, so go ahead and adjust these to feel them out. (Just remember they reset when you exit the play test.)

Projection Force - Affects how much you get pushed when exiting the Propulsion Zone. At values below 10, it seems to affect the angle at which you are pushed. Any negative value throws you up into the air at various intensities.

Projection Max Speed - Affects how fast you move while in the Propulsion Zone. A value of 0 will effectively trap you inside of it. Still can move, albeit very slowly. Can be grappled out of. Negative values reverse the effect of the zone.

Vignette Effect - Adjusts how much of the vignette you want to see while in the zone. Lower numbers brighten the screen, while higher numbers make the vignette bigger, and what you can see smaller.

Vignette Anim Time - Affects how much time it takes to have the vignette transition in. Only affects the vignette and not the white brightening that is on by default.

Pull Lerp - Affects how the zone handles pulling the player in. 0 makes it feel floaty and doesn't pull you towards the center as quickly. Negative numbers continue this trend. Most positive numbers above 0.5 tend to make it shake wildly and fling out out in a seemingly random direction.

Cancel Gravity - Affects if you fall during the time while in the zone. If turned off, it can be combined with a 0 Pull Lerp to simply have an area that can apply speed to the player without pulling them in.

Sounds - Affects whether the zone makes sounds.

Apply Vignette - Affects if the vignette effects shows on screen while in the zone.
Drones
Prefab name: _internal_enemydron_

Drones are the only enemy type in the game.

The cone that is shown going out from the drone is the drone's sightlines, Adjust this to affect the drone's ability to see the player. The easiest way to do this is with the rotation transform on the drone itself.


Variables
Since there are many variables to tweak for drones, I will only go over the more important ones, as most are things that don't need to be changed at all.

Default State - Changes what state the drone is in when it spawns. (Idle, Patrolling, Seeking, Alert, Kill)

Should Restart With Level - Self explanatory.

Behavior Time Offset - How long the drone takes to notice the player. 0 is instant.


Patrolling
Warning: Not sure if this gets includes in the exported level. Use at your own risk.
This allows the drone to move around on based on a spline. (Won't go in detail on how to make a spline, but play around with the spline buttons on the editor and you'll eventually figure it out.)

Patrol Path - This is where you put your spline after you are done creating it. The drone will follow this path constantly until you come into range.

Patrol Speed - Affects how fast the drone goes through the spline.

Patrol Clamp Mode - Clamp plays the spline once. Loop repeats over and over, is the default. Ping Pong goes forwards and backwards through the spline, similarly to Loop.
End Doors
Prefab name: _internal_end_door_

End doors are dead simple. Just place them down for an exit to the level. Nothing to configure. You can have as many as you want in the level, but generally you should only have one.