Mina PΓͺcheux - Since November 2022
This repo contains the code and assets for the various Unity/C# tutorials I published as texts/videos on YouTube and Medium (π¬π§ + π«π·).
As of now, the repo contains some global assets/settings, and personal libraries (in the Assets/Dependencies/
folder), like:
BehaviorTree
: A basic C# library implementing abstract node and tree structures to create behaviour trees. You can see an example of usage in Tutorial 01: Using behaviour trees for a RTS collector AI.AStar
: A basic C# library with A* pathfinding algorithms. For now, it's only for 2D tilemaps - the code was adapted from this great Github by pixelfac.
And in the Assets/
folder, you'll find the code and assets for the following tutorials:
Discover how to use the behaviour tree AI design pattern to give some life to RTS collector units! These little trucks will chop down trees or mine ores to gather wood and minerals, auto-finding the closest targets and regularly delivering their resources to a nearby depot, until the entire map is empty...
- Watch on YouTube: in English π¬π§, in French π«π·
- Read on Medium
- See the files in the repo
Learn how to setup a basic day-and-night cycle in a 2D scene, by changing the global light and toggling some smaller spots.
- Watch on YouTube: in English π¬π§, in French π«π·
- Read on Medium
- See the files in the repo
Want to learn more about Unity's new InputSystem package, and how you can use it to create basic cross-platform player controller that supports both gamepads and keyboard+mouse layouts? Then check out this quick tutorial :)
- Watch on YouTube: in English π¬π§, in French π«π·
- Read on Medium
- See the files in the repo
Important note: The repo contains an extended version of the HeroController.cs
script we make in the YouTube video with additional camera control (you can find it in the HeroControllerWithCamera.cs
script). To use it, replace the HeroController
component with the HeroControllerWithCamera
on the "Hero" object, and then disable the "Aim" feature of the Cinemachine camera, so the script is free to rotate the view as it wants :)
Want to learn more about Unity's Scriptable Objects, and how you can use it to store custom data types in an efficient way? Then check out this tutorial :)
- Watch on YouTube: in English π¬π§, in French π«π·
- Read on Medium
- See the files in the repo
Learn how to make a simple field of vision (FOV) system for a robot guard unit with custom debug gizmos for easy visualisation and tweaking, and with related alertness levels.
- Watch on YouTube: in English π¬π§, in French π«π·
- Read on Medium
- See the files in the repo
Wanna discover how to embed events in your Unity animation clips to precisely time callbacks and trigger specific reactions all throughout the moves of your hero avatars? Check out this quick tutorial! :)
- Watch on YouTube: in English π¬π§, in French π«π·
- See the files in the repo
If you want to learn how to make your own RTS-like "free placement" building system, then check out this video tutorial!
- Watch on YouTube: in English π¬π§, in French π«π·
- Read on Medium
- See the files in the repo
Wanna extend on our previous "free placement" building system and learn how to turn it into a snapping grid version? Check out this quick tutorial!
- Watch on YouTube: in English π¬π§, in French π«π·
- Read on Medium
- See the files in the repo
Learn how to create a simple procedural grid with adaptive cell size, world-relative coordinates, and customisable colours/transparency.
Edit: @Montesinnos added a really nice improvement to the shader to avoid the offset due to the thickness - it's been merged in Sept, 2023 and is available in the main branch of this repo! :)
- Watch on YouTube: in English π¬π§, in French π«π·
- Read on Medium
- See the files in the repo
Discover the specificities of wireframe shaders, why making them cross-platform is hard, and how to dodge this issue thanks to pre-computed barycentric coordinates.
- Watch on YouTube: in English π¬π§, in French π«π·
- Read on Medium
- See the files in the repo