FPS Tutorial Series #13 - Code Reloading - Unity

Опубликовано: 27 Март 2026
на канале: Yaseen Mujahid
3,720
114

Previously we were using reloading, which relied on an animation. This system is more reliable, and is easier to setup/edit, as the reload logic is now all controlled via code.

We'll be covering co-routines, which allow transfer of control between methods, allowing multi-tasking more or less (not to be confused with multi-threading, they're similar, but code is not executed parallel).

Don't forget the poll at 7:16
----------------------------------------------------------------------------

► Timestamps:
= Intro - 01:14
= Removing Old Reloading System - 02:22
= Setting Up Code - 03:12
= Co-routine & Executing them - 05:43
= State Bug Fixing - 11:12
= Adjusting Reload Times - 12:32
= Fin - 13:20
----------------------------------------------------------------------------

╔►Fiverr: https://www.fiverr.com/yaseenmujahid
╚►Fiverr Gigs:
https://www.fiverr.com/yaseenmujahid/...
https://www.fiverr.com/yaseenmujahid/...

Check out:
╔►Facebook:   / 10yaseen1  
╠►Deviant Art: http://10yaseen1.deviantart.com/
╠►Player.me: https://player.me/10yaseen1
╠►Twitter:   / yaseenmujahid  
╠►Picarto: https://picarto.tv/Yaseen
╠►Discord:   / discord  
╚►Patreon:   / 10yaseen1   (Will be taken down soon)

My Rig:
╔►CPU: Intel Core i7 8700K @ 4.3GHz
╠►GPU: Gigabyte RTX 2080 8GB
╠►OS: Windows 10 Home 64 bit
╠►RAM: Corsair Vengeance DDR4 2400MHZ 3x8GB
╚►Motherboard: Z370 Aorus Gaming 5

Anyways, rate, comment and subscribe for more. Share it with anyone you think might be interested, would be really appreciated. And thanks for all the support!
------------------------------------------------------

• Licence:

► Jazzaddict's Intro by Cosimo Fogg (201):   / cosimo-fogg  
Creative Commons — Attribution 3.0 Unported— CC BY 3.0
Free Download / Stream: https://bit.ly/jazzaddicts-intro
Music promoted by Audio Library:    • Video  

► Electronic Vibes by HookSounds http://www.hooksounds.com/
Creative Commons — Attribution 4.0 International — CC BY 4.0
https://creativecommons.org/licenses/...
Music provided by Audio Library    • Video  

► And all the memes, that I do not own.
------------------------------------------------------

Keywords:
unity
unity 5
fps
unity fps
fps tutorial
first person shooter
let's make a game
tutorial series
reloading
animating
mecanim
animation
intermediate animation
state machine
state machine behaviours
aiming down sights
weapon switching
ui
basic ui
cats
accuracy
bullet spread
fixes
ai
follow
navmesh
navigation
agent
co routine
coroutines