Skip to content

Habrador/Unity-Custom-Tools-Tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unity Custom Tools Tutorial

Source code for my custom tools tutorial in Unity: https://www.habrador.com/tutorials/editor-scripting/

Notice that the source code is not exactly the same as in the tutorial because it's easier to update the code on GitHub, but the basic idea is the same.

Part 1. Add prefabs within circle

It's kinda boring to add prefabs manually if you have to add many of them, such as when you make a forest. A better way is to make a custom tool where you can add tree prefabs within a circle with just a button click. And if you add too many of them, you can easily remove them with another click.

Prefabs within circle gif

Part 2. Add prefabs along a line

It's also kinda boring to make a wall manually. A better way is to make another custom tool where you instead of spawning trees within a circle, you spawn wall sections between waypoints.

Prefabs walong line gif