Você está na página 1de 38

Winterbyte

MANUAL
Ultimate Survival 0.1
Video tutorials will be (or already are) available at:
https://www.youtube.com/channel/UChtibaEti4OD5kylKUesn0A

Forum thread:
https://forum.unity3d.com/threads/0-1-pending-ultimate-survival-the-complete-
survival-template.442016/

E-mail support:
mailto:winterbyte312@gmail.com

2|Page
CONTENTS

HOW TO SET UP A SCENE ............................................................................................ 4


HOW TO ADD A NEW ITEM (DATA ONLY) .............................................................. 5
HOW TO ADD A GUN ...................................................................................................... 9
A) ADDING A GUN FROM SCRATCH ....................................................................... 9
B) EXPLAINING THE GUN SCRIPTS ....................................................................... 15

HOW TO ADD A TOOL ................................................................................................. 18


A) ADDING A TOOL FROM SCRATCH .................................................................... 18

MINEABLE OBJECTS .................................................................................................... 25


A) ADDING A ROCK ........................................................................................ 25
B) ADDING A TREE ................................................. ERROR! BOOKMARK NOT DEFINED.
C) EXPLANATIONS .......................................................................................... 27

AI ....................................................................................................................................... 28
A) ADDING A HUMANOID AI ............................................................................ 28
B) GROUPING THE AGENTS WITH THE AIGROUP .................................................... 30

OTHERS ........................................................................................................................... 31
A) THE INPUT WINDOW ................................................................................... 31
B) HOW TO CREATE A NEW SURFACE IN THE SURFACE DATABASE ............................... 32

ADDING A NEW BUILDABLE OBJECT ..................................................................... 33


A) ADDING BUILDABLES TO OTHER BUILDABLES/SOCKETS ......................................... 33
B) CREATING A BUILDABLE FROM SCRATCH ........................................................... 34

3|Page
How to set up a scene
Whether you created a new scene or want to import the asset functionality into
your existing one, you need a few objects to make sure the scene will function
properly.

In the Project Window, navigate to Ultimate Survival/Resources/_Scene Base


This folder contains the objects which have to be in a scene:

_Game Controller - is the central point from where you access utilities or important
variables and properties.

In-Game GUI - here you'll find all the UI systems, like the Inventory, Hotbar, Item
Inspector and many others.

Male_Player - this is the player object, through which you can play the game.

Time Of Day - a simple, day-night cycle prefab.

NOTE: you can add them automatically from the menu, just go to:
Tools/Ultimate Survival/Add/Base Scene Objects:

NOTE: Anything else you might need, like ambience audio, wind zones, reflection
probes, and so on, it's up to you to add and configure for your custom scene.

4|Page
How to add a new item (data only)
1. Adding the item to the database
- To create any item, go to the menu, and click on Ultimate Survival/Item Management:

- While there, you'll see the items organized by category. Choose a category, or add
your own, and then create your item in that category, just click the + button for
adding new elements.

- When you've added a new item in your desired category, click on it, you'll see all
of it's data in the Item Inspector:

5|Page
2. Explaining the item settings
Name - the item name.

Display Name - useful when you want to display the same name for 2 or more
items (eg. maybe you have 3 variations of one item).

Icon - the item icon.

World Object - this is the "pickup" for this item, so you can actually drop it, or pick
it up from the ground. See how to create a pickup here.[ADD LINK]

Stack Size - how many items of this type you can stack at once.

Descriptions - you can have multiple descriptions, simple items will need only one,
more complex items, like the one above (a gun), requires a second description to
describe it's properties (eg. a gun can have a Range, or a Fire Rate property, or
both).

NOTE: Multiple descriptions are useful when you want to display them in different
parts of the screen, like here:

You can clearly see if we had just one description, it'd be difficult to format it's text
like that.

NOTE: You can use Rich Text as well (HTML tags to customize the text); If you're
not familiar with it, take a look at how the other items made use of it, and visit this
page: https://docs.unity3d.com/Manual/StyledText.html

NOTE: You can also display an item property (we'll talk about them below) in the
description, to do that, you have to write the index of the property, and
surrounded by curly braces: {index}.

6|Page
Example: "Defense: {0}", "Fire Rate: {1}", "Attack Power: {2}"

Take a look at a live example:


In the second description, we defined a custom color by using the <color> tag and
also wrote {0}, which refers to the first property of this item, Defense:

And this is how it looks in the game (you can see the value of Defense being
displayed):

Properties - all the item's properties, like Defense, Durability, Health Change, and so on;
You can also define custom properties, I'll show you how to do that, below.

Is Placeable? - if enabled, it's considered the item can be placed (example would be
a furnace, or a campfire). To learn how to create a placeable object (which you can
link with an item), jump here.[LINK]

Recipe - a list with all the "ingredients" necessary to craft this item, and also how
much time it takes to craft it.

7|Page
3. Adding a new property
- To add a new property, select the Property Editor tab:

Here you can see all the existing properties; To add one, just click the + button.

- You can also choose a type for a property, because certain properties can hold
different types of values, for example:

Defense - is just a number, a single fixed value, of type Int.

Hunger Change - is a random number in a range (min, max), of type Random Int.

Can Dismantle - doesn't need a special type, it just needs to be attached to the item,
for that we have the None type.

8|Page
How to add a gun
a) Adding a gun from scratch
1. Adding the item data
We'll add the default assault rifle, from scratch, under the name "New Rifle":
- Go to the item management window, like you learned here
- Select the Gun category
- Select the Assault Rifle item, and hit Shift + D, to duplicate
- Rename it to "New Rifle"
- Tweak it's description, crafting recipe, and properties.

NOTE: You can now add the item to storage boxes, corpse loot, and so on.

WARNING! When we duplicated the assault rifle, the pickup from the old item got
duplicated too. The pickup is linked to this item, through the name, we have to
create a new pickup with our new name, "New Rifle".

9|Page
2. Creating the pickup
- Go to Ultimate Survival/Prefabs/Pickups/ and duplicate the Assault Rifle_Pickup object
- Rename it to "New Rifle_Pickup":

- Select the new pickup we've made, and on the ItemPickup script, change the Default
Item setting, to "New Rifle" (our new item name).

NOTE: Now when we pick up this object, the "New Rifle" item will be added to the
inventory!

- Finally, don't forget to assign this pickup, to the item's "World Object" property:

10 | P a g e
3. Adding the first-person object
NOTE: To follow the next steps, disable the "In-Game GUI" object, in the scene, to
allow you to see the gun.

Let's add the first-person version of our new gun:


- Go to Ultimate Survival/Models/Weapons/Assault Rifle
- Go to the player prefab, called "Male_Player" in the scene, and navigate to
Male_Player/Look Root/FP Root/

- Here, create a new object called "14-New Rifle". Drag the Assault Rifle model from
the project window, into it, and call it "Model":

- Adjust the model's position to look good & correct, on camera

- Set the Model object layer to First Person

- Add an empty object, called "Pivot". Position it where you want the pivot of the
movement to be (movement = sway, bobbing, etc). Add the PivotDisplayer script to it,
to make it visible in the scene.

11 | P a g e
- Add the following scripts to the 14-New Rifle object (the root): AudioSource, FPHitscan,
FPMotion, FPHitscanAnimator

WARNING! By default, a new audio source is set to 2D, don't forget to set the
"Spatial Blend" to 1, that will make the source 3D.

On the FPHitscan component, do the followings:


- Set Object Name to "New Rifle"
- Set Use While Near Objects to false
- Set Fire Mode to Full Auto
- Set Mask to Default, Hitbox
- Set Rounds Per Minute to 650
- Add the AudioSource component to the Audio Source field

12 | P a g e
- Expand Fire Audio, and set some fire sounds, pitch and volume

To set up a muzzle flash, do the followings:


- Navigate to: Ultimate Survival/Prefabs/Effects/Muzzle Flash_Medium
- On the 14-New Rifle object, navigate to: /Model/Armature/Weapon
- Add the muzzle flash object here
- Tweak it's position and rotation, click "Simulate" to see the effect
- Come back to FPHitscan, and assign the muzzle flash

To set up a tracer, do the followings:


- Navigate to Ultimate Survival/Prefabs/Effects/Tracer
- Add the tracer to the FPHitscan's Tracer field
- Hit the Play button, get the gun, shoot, and tweak the Tracer Offset

To set up the shell ejection, do the followings:


- Navigate to Ultimate Survival/Prefabs/Effects/Shell_Revolver
- Assign this shell to the FPHitscan's Shell Prefab field
13 | P a g e
- Assign the Pivot object, to the Weapon Root field
- Set the Shell Spawn Offset to: 0.05 | 0.05 | 0
- Set the Shell Spawn Velocity to: 1 | 1.2 | 0.3

The gun has animations, so let's set up the animation stuff:


- Assign the FPMotion's Animator field (Drag Model here)
- Navigate to Ultimate Survival/Mecanim/Controllers/Weapon /Assault Rifle
- Duplicate this controller, and name it "New Rifle"
- Click the new controller, and assign the corresponding animations. We've
duplicated the controller of the same animated gun, so we don't need to assign the
animation clips again.

- Assign the new controller to the 14-New Rifle/Model Animator component

To set up the procedural motion, go to the FPMotion component and:


- Assign the Model & Pivot fields
- Apply the Two Handed Gun preset
- Tweak the settings to your liking. To learn more about them, go here.

WARNING! Remember to re-enable the In-Game GUI object!

14 | P a g e
b) Explaining the gun scripts
1. FPHitscan
It's the script which handles the shooting functionality of the object.

Object Name - the object name. It is necessary this one is the same as the item name.
You'll need an item with the same name which you can have in the inventory, select
in the hotbar, etc. When that item is selected, this object will be equipped.

Target FOV - the field of view (FOV) of the first-person camera when this object is
equipped.

Use While Near Objects - can the player use this object, when he's very near to an
object, wall, etc. ?

Fire Mode - Full Auto - the gun is automatic (fires continuously). Burst - fires in bursts
(eg. in bursts of 3 shots). Semi Auto - the player has to release the attack button before
shooting again.

Mask - the layers this gun can shoot at.

Max Distance - the max distance at which you can shoot with this gun.

Fire Duration - used in Semi Auto mode, the minimum time between shots.

Burst Length - how many shots you fire in a burst.


Burst Duration - how much time it takes to take all the shots.
Burst Pause - the time between shots, while firing a burst.

Rounds Per Minute - used in Full Auto, how many shots can you take in a minute,
with this gun.

Ray Count - how many projectiles are in a single shot (useful for shotguns because
they need more than 1).

Normal Spread - the spread (in angles) of the projectiles, when shooting while not
aiming.

15 | P a g e
Aim Spread - the spread (in angles) of the projectiles, when shooting while aiming.

Ray Impact
Max Damage - damage per shot, when the object hit is close.
Max Impulse - the impulse applied per shot, when the object hit is close.
Distance Curve - how the damage & impulse lower over distance.

Audio Source - the audio source of this gun.

Fire Audio - the sounds, pitch, and volume of the gun when firing.

Muzzle Flash - a particle system which will be played as a flash when firing (ideally
the ParticleSystem component should have the "Lights" module enabled as well).
Tracer - the trace of a bullet / projectile.

Tracer Offset - the position offset, relative to the gun, at which the tracer is
spawned.

Shell Prefab - not all guns will require to eject a shell, but most of them do; This is
the prefab.

Shell Spawn Method - Auto - it'll be spawned automatically when the shot is taken.
On Animation Event - you have to call it with an animation event (useful for timing the
shell ejecting with the animation).

Anim Event Handler - a script which should be attached to the model (which has an
Animator component attached). It's purpose is to pick up animation events from the
animated model.

Weapon Root - the spawn offset of the shell is relative to this object.

Shell Spawn Offset - the spawn offset of the shell, relative to Weapon Root.

Shell Spawn Velocity - the velocity at which the shell is ejected.

Shell Spin - dictates the spin of the shell on ejection.

16 | P a g e
2. FPMotion
What I need to explain for this script, is the 3 elements used here, Sway, Bob and
Offset. You can see there are different types of them, like "Walk Bob", "Aim Bob",
etc, "Idle Offset", Run Offset, etc.

Sway - it helps the object look more dynamic, otherwise it'll look too rigid,
unrealistic; When the camera moves, the object will stay a little bit behind.
Enabled - if it's not enabled, the sway will not be applied to the movement.
Magnitude - how much it stays behind, if it's movement sway, the magnitude
is in units, if it's rotation sway, the magnitude is in angles.
Lerp Speed - the lower this is, the smoother the sway.

Bob - used for the left & right movement of the object, when walking & running.
Enabled - if it's not enabled, the bob will not be applied to the movement.
Speed - how fast is the animation.
Cooldown Speed - after this bob is not used, how fast it fades out.
Amount X, Y - the maximum translation of the bob.
Curve - control the speed of the animation at different intervals.

Offset - set different position & rotations for different states.


Lerp Speed - how fast it fades in & out.
Position - the position offset.
Rotation - the rotation offset.

3. FPHitscanAnimator
Manages the actual animations (if the gun/object has them), and also the enabling
and disabling of the object.

Fire Speed - the speed of the fire animation.

Fire Types Count - how many fire animations this gun has? (they will be played
randomly).

Fire Shake - the camera shake when you fire.

17 | P a g e
How to add a tool
a) Adding a tool from scratch
1. Adding the item data
We'll add the default axe, from scratch, under the name "New Axe":
- Go to the item management window, like you learned here
- Select the Tool category
- Select Axe item, and hit Shift + D, to duplicate
- Rename it to "New Axe"
- Tweak it's description, crafting recipe, and properties.

NOTE: You can now add the item to storage boxes, corpse loot, and so on.

WARNING! When we duplicated the axe, the pickup from the old item got
duplicated too. The pickup is linked to this item, through the name, we have to
create a new pickup with our new name, "New Axe".

18 | P a g e
2. Creating the pickup
- Go to Ultimate Survival/Prefabs/Pickups/ and duplicate the Axe_Pickup object
- Rename it to "New Axe_Pickup":

- Select the new pickup we've made, and on the ItemPickup script, change the Default
Item setting, to "New Axe" (our new item name).

NOTE: Now when we pick up this object, the "New Axe" item will be added to the
inventory!

- Finally, don't forget to assign this pickup, to the item's "World Object" property:

19 | P a g e
3. Adding the first person object
NOTE: To follow the next steps, disable the "In-Game GUI" object, to allow you to
see the gun.

Let's add the first-person version of our new gun:


- Go to Ultimate Survival/Models/Weapons/Axe

- Go to the player prefab, called "Male_Player in the scene, and navigate to


Male_Player/Look Root/FP Root/

- Here, create a new object called "14-New Axe". Drag the Axe model from the
project, into it, and call it "Model"

- Adjust the model's position to look good & correct, on camera

- Set the Model object layer to First Person

- Add the FPMeleeEventHandler component, to the Model object

20 | P a g e
- Add an empty object, called "Pivot". Position it where you want the pivot of the
movement to be (movement = sway, bobbing, etc). Add the PivotDisplayer script to it,
to make it visible in the scene.

- Add the following scripts to the 14-New Axe object (the root): AudioSource, FPTool,
FPMotion, FPMeleeAnimator

WARNING! By default, a new audio source is set to 2D, don't forget to set the
"Spatial Blend" to 1, that will make the source 3D.

21 | P a g e
On the FPTool component:
- Set Object Name to "New Axe"
- Set Use While Near Objects to true
- Assign the Event Handler (drag the Model object here)
- Set Max Reach to 1.2
- Set Time Between Attacks to 0.75
- Set Damage Per Hit to 100
- Set Impact Force to 15
- Assign the Audio Source field
- Set the attack sounds, pitch and volume
- Set the Sound Type to Chop
- Set the Tool Purposes to have 1 element, Cut Wood

22 | P a g e
To set up the procedural motion, go to the FPMotion component and:
- Assign the Model & Pivot fields
- Apply the Tool preset
- Tweak the settings to your liking. To learn more about them, go here.

The tool has animations, so let's set up the animation stuff:


- Assign the FPMotion's Animator field (Drag Model here)
- Navigate to Ultimate Survival/Mecanim/Controllers/Weapons/Axe
- Duplicate this controller, and name it "New Axe"
- Click the new controller, and assign the corresponding animations. We
duplicated the controller of the same animated tool, so we don't need to assign the
animation clips again.

- Assign the new controller to the 14-New Rifle/Model Animator component

23 | P a g e
IMPORTANT! The purpose of the FPMeleeEventHandler script (attached to the Model
object) is to pick up animation events. The most important event is the "Hit" event, it
is triggered when the axe/melee object looks like it's hitting another object. If you
add your own melee object, make sure to add an animation event (with the name
"On_Hit"). This is how it looks for the axe model:

WARNING! Remember to re-enable the In-Game GUI object!

24 | P a g e
Mineable objects
a) Adding a rock
Navigate to Ultimate Survival/Prefabs/Objects/Rock_Metal:

If you want to add a new rock:


- Duplicate this object
- Rename it
- Assign your rock mesh to the MeshFilter component
- Assign your rock materials to the MeshRenderer component
- Tweak the settings on the Mineable Object script To learn about them, go here.

You also see other components attached, the important ones are:

Mesh Collider - you need a collider so the object is detected, it doesn't have to be a
MeshCollider, any collider will work.

Nav Mesh Obstacle - it will make the AI agents avoid this object (and not walk
through it).

25 | P a g e
b) Adding a tree
Navigate to: Ultimate Survival/Prefabs/Objects/Empty Tree:

NOTE: this object will be spawned at each terrain tree position.

If you want to add a new tree (terrain version):


- Duplicate this object
- Rename it
- Tweak the settings. To learn about them, go here.

Adding the tree to the terrain


- If your terrain doesn't have a TreeManager component, add one
- On the TreeManager component, add a new element in the Tree Creators list
- Prototype Index corresponds to the index of your tree, on the terrain tree list. If your
tree is first, the index is 0.
- Add the newly created empty tree object, to the Prefab field

You also see other components attached, the important one is:

Capsule Collider - you need a collider so the tree is detected.

* If you want to learn more, go to the Forest scene, and check the Terrain object.

26 | P a g e
c) Explanations
Let's discuss the MineableObject/Mineable Tree script settings:

Required Tool Purpose - each tool can have a "purpose", an axe should have Cut
Wood, while a pickaxe Break Rocks. This helps when you want certain tools to be
effective on certain objects (eg. you don't want to cut wood with a pickaxe).

Resistance - 0 means the incoming damage is not reduced at all (0%), 0.5 means the
damage is reduced by 50%, and so on. This is a common property found on any
object that can take damage, like the player, or a cannibal, or even a buildable
object.

Destroyed Object - when the object's health reaches 0, it will obviously "die", and
this is the object / prefab that will be spawned.

Destroyed Object Offset - the position offset of the spawned object, relative to the
mineable object.

Loot - a list with the items that can be gathered from this object.

Show Gather Message - whether or not to show a message when the player gathers
items from this object.

Message Color - the base color of the message.

Loot Name Color - If you gather 5 x Stone, the message will be: "You gathered 5 x
Stone"; "Stone" will have the Loot Name Color color, and the rest of the text will have
the Message Color color.

27 | P a g e
AI
a) Adding a humanoid AI
I'll show you how to turn a Humanoid model, into a cannibal:

- Drag your character in the scene

- Go to the menu Tools/Ultimate Survival/Add/Humanoid AI Creator


- Drag the model in the "Agent" field, and search for the Cannibal animator
controller, and click Create.

Now the agent is created, but it still needs a ragdoll:


- Go to the menu Tools/Ultimate Survival/Add/Humanoid Ragdoll
- If your model is not Humanoid go here for more info on how to set it up
- If it's recognized as being humanoid, the ragdol creator will automatically assign
the bones in their respective field, if not, try and assign them manually

28 | P a g e
- Click Create, this will add all the colliders, rigidbodies & joints necessary for the
ragdoll to work.
- Expand the model, and go the armature root, usually called "Armature"
- Select it, and add a Ragdoll component
- Drag the pelvis/hips bone into the Pelvis field
- In the Surface Texture field, add your character's main texture (make sure it's set up
in the Surface Database, as a "skin" texture, so the blood effects can work)

- Go to the EntityDeathHandler component


- Here, on the "Ragdoll section, set Enable Ragdoll to true
- Drag the Ragdoll component we just attached to the Armature.

* Everything should be working now.

29 | P a g e
b) Grouping the agents with the AIGroup
The AIGroup script will take care of spawning & respawning of agents.

Just scatter a few groups around the map, or create them via scripting, and they're
going to patrol and move around the group, they'll behave just like a group.

AIGroup script

Group Color - the color of the gizmos used for this group (useful for the
visualization of the group)

Enable Spawning - if enabled, it'll keep spawning

Make Agents Children - this will make the newly created agents, children of this
group object

Prefabs - a list with the agents that will be spawned

Group Radius - the agents will be spawned around the group, in this radius
(randomly)

Max Count - this is the spawn limit for the group

Spawn Mode - when we're allowed to spawn the agents?

Spawn Interval - the spawn interval

30 | P a g e
Others
a) The input window
To access the input window, go to the menu, and navigate to Ultimate Survival/Input
Window:

This window is an alternative to Unity's built-in Input window, and it has mainly
two advantages:
- You can rearrange the buttons & axes
- You can delete and add easily, at every position in the list

* So if you're familiar with Unity's way of gathering input, this is done in the same
way, by using the same methods (GetButton, GetAxis, etc).

Check out the PlayerInputHandler, and InputManager scripts, to learn more.

31 | P a g e
b) How to create a new surface in the Surface Database
The surface database is a collection of surfaces. Each surface defines it's own
footsteps, bullet hits effects, decals, and so on.

To edit the database file, go to: Ultimate Survival/Resources/Custom Data/Surface Database

Default Surface - is the surface data used, when no other surface data matches the
texture we're trying to get data for.
Surfaces - all the surfaces defined so far.

If you expand the "Grass" surface, this is what you see:

Name - the surface name.


Textures - if you want to add a texture to this surface, this is where you do it.

The rest of the settings are pretty self-explanatory, basically a big chunk of sounds &
effects to play in different situations.

32 | P a g e
Adding a new buildable object
A buildable object is an object which can be placed by the player, usually in sockets.
Socket = a point on a buildable, in which other buildables can be placed. (eg. a point
where walls can be placed, on a platform).

a) Adding buildables to other buildables/sockets


- Go to Ultimate Survival/Prefabs/Building/Platform_Wood
- Drag the platform in the scene.

- If you expand it, you'll see all the available sockets.


- Click on a socket, select an element from the "Supported Pieces" list
- Click on Edit Piece Offset, this will show a preview and will enable you to edit that
piece offset, relative to this socket.

* To add new buildables to this socket (they'll snap here), just hit the + button and
drag it in here.
WARNING! When Edit Piece Offset is enabled, you can't edit the socket position &
rotation with the handles.

33 | P a g e
b) Creating a buildable from scratch
1. Creating the base object
- Drag your model in the scene
- Go to menu -> Tools/Ultimate Survival/Add/Buildable Creator
- A wizard will appear
- Drag your object from the scene, to the Model field
- Click Create.

Model - your object model, it has to be in the scene


Resistance - how strong it is (0 - weak, 1 - indestructible)
Is Obstacle For AI - usually foundations need this (it'll add the NavMeshObstacle
component, the AI will avoid the object)

2. Adding the hitbox


If you want your object to be damageable, it needs a hitbox. A hitbox is a non-
visible object, situated under a buildable object.
How to add and configure a hitbox?
- Expand your object, and create an empty object called "Hitbox"
- Set it's layer to "Hitbox"
- Add a Rigidbody component, and set Is Kinematic to true
- Add a Hitbox component
- Add a collider and make it fit the object. Most of the time, a BoxCollider will do the
job.
- Add a SurfaceIdentity component, and drag the object's main texture in the Texture
field, make sure the texture is added somewhere in the Surface Database.

34 | P a g e
3. Adding new sockets
- Create an empty object, call it "Socket"
- Set it's layer to "Building Piece"
- Add the Socket component

- To add a new piece offset, just hit the "+" button, and drag your pieces here.
- To modify and preview the piece, select "Edit Piece Offset"

WARNING! When you drag a piece to the socket, make sure you drag from the
project, not from the scene!

35 | P a g e
4. Configuring the Building Piece component (Important!)
This is the most important part, on the Building Piece component you edit all the
behaviours & functionality. Go back to the Building Piece component, expand it.

Let's go through each setting, and explain what it is, and how to tweak it:

Piece Name - the name of this piece.

Required Items - a list with all the required items in order to place this object.

Rotation Axis - on what axis should the object rotate? (when the player uses the
rotate buttons)

Show Bounds - useful to show the bounds gizmo.

Bounds - make sure Show Bounds is enabled, and start editing it. Use the Scene view as
well.

The blue box is the bounds.


36 | P a g e
Main Mesh - drag the main mesh in here. It'll be used for previewing the piece in
game.

Ignored Renderers & Ignored Colliders - the system will enable & disable all the
attached renderers & colliders, but will ignore the ones from those lists.

Needed Space - the space in a socket, to occupy (so you can't place 2 walls in the
same sockets, etc).

Requires Sockets - if enabled, it can't be placed on anything, it requires to be


snapped into a socket.

Out Of Ground Height - the vertical offset when placing freely.

Enable TP - "Enable Terrain Protection", useful for platforms, so you can't place
them too much in the terrain. It's a box which if touched by the Terrain, you won't
be able to place it.

Show TP - the box will be shown in the scene view.

TP Box - here you edit the box, just like editing the bounds.

* This is how the terrain protection box is configured on the wood platform:

37 | P a g e
5. Adding a piece to the Selection Wheel
- In the scene, navigate to: In-Game GUI/Canvas/1-Windows/10-Building Menu/Window/Wheel:

- Expand a category, and click on a piece

- Duplicate a piece from here (this is just the UI)


- Rename the object accordingly
- Write the name that will be displayed in the wheel, like you see in the image "Wall
(Wood)"
- Drag your buildable object, from the project, in the Buildable Object field.

* To edit the positions of the categories, go to the Wheel object, and edit the Layout
header
* To edit the position of the pieces in a category, click on a category, and edit the
Layout header.

* You can now select and place your new piece.

38 | P a g e

Você também pode gostar