Uploaded October 2022 | Updated September 2026, 2 hours ago
Learn how to create a ScriptableObject-based gun system from scratch for your game!
In this video, which is part 1 of a much larger gun system series, we'll create 3 ScriptableObjects to control our Gun, Bullet Trails, and Shoot Configurations for 2 types of guns. Specifically, we're doing "Hitscan" or Raycast shooting in this video.
In this video I DO NOT cover the Impact System: youtu.be/kT2ZxjMuT_4 you can check out that video for the full explanation for how that works
That’s for the SurfaceManager and ImpactType both. If you’re not interested in using that system for impacts, feel free to just remove that code! Everything will still work!
In this series you'll learn how to make a configuration-driven gun system with ScriptableObjects that will be able to have:
⚫ Hitscan Guns - Covered in THIS VIDEO!
⚫ Projectile Guns
⚫ Simple Bullet Spread - Covered in THIS VIDEO!
⚫ Complex Bullet Spread
⚫ Reloading
⚫ Attachments
⚫ Animated Models
⚫ Simple Impact Damage
⚫ Damage Effects such as burning, freezing, explosions, etc...
⚫ And even more!
🔶 ALL THINGS LlamAcademy now available at: https://llamacademy.dev/support including latest tutorials, courses, ways to support, and more! Check it out 🙂
👨💻 Get the FULL FREE PROJECT on GitHub: github.com/llamacademy/scriptable-object-based-guns
🏷️Save 25% on the ultimate C# IDE: JetBrains Rider with code LLAMACADEMY: jetbrains.com/store/?section=personal&billing=yearly
Some links may be affiliate links, which at no additional cost to you, gives me a small portion of the purchase.
Chapters:
00:00 Intro & Overview
01:43 Why ScriptableObjects over Prefabs?
02:35 GunType.cs
02:48 ShootConfigScriptableObject.cs
03:28 TrailConfigScriptableObject.cs
04:26 GunScriptableObject.cs - Variables
05:45 GunScriptableObject.cs - Spawn()
06:33 GunScriptableObject.cs - CreateTrail()
07:15 GunScriptableObject.cs - Shoot()
09:14 GunScriptableObject.cs - PlayTrail()
10:47 Design Discussion
11:27 GunScriptableObject.cs - Adding Impact Effects with SurfaceManager
12:22 Become a Supporter
12:53 PlayerGunSelector.cs
14:28 PlayerAction.cs
15:08 Creating & Configuring the Gun ScriptableObjects
19:48 Demo
21:00 Closing Thoughts on this Implementationver
Learn how to create a ScriptableObject-based gun system from scratch for your game!
In this video, which is part 1 of a much larger gun system series, we'll create 3 ScriptableObjects to control our Gun, Bullet Trails, and Shoot Configurations for 2 types of guns. Specifically, we're doing "Hitscan" or Raycast shooting in this video.
In this video I DO NOT cover the Impact System: youtu.be/kT2ZxjMuT_4 you can check out that video for the full explanation for how that works
That’s for the SurfaceManager and ImpactType both. If you’re not interested in using that system for impacts, feel free to just remove that code! Everything will still work!
In this series you'll learn how to make a configuration-driven gun system with ScriptableObjects that will be able to have:
⚫ Hitscan Guns - Covered in THIS VIDEO!
⚫ Projectile Guns
⚫ Simple Bullet Spread - Covered in THIS VIDEO!
⚫ Complex Bullet Spread
⚫ Reloading
⚫ Attachments
⚫ Animated Models
⚫ Simple Impact Damage
⚫ Damage Effects such as burning, freezing, explosions, etc...
⚫ And even more!
🔶 ALL THINGS LlamAcademy now available at: https://llamacademy.dev/support including latest tutorials, courses, ways to support, and more! Check it out 🙂
👨💻 Get the FULL FREE PROJECT on GitHub: github.com/llamacademy/scriptable-object-based-guns
🏷️Save 25% on the ultimate C# IDE: JetBrains Rider with code LLAMACADEMY: jetbrains.com/store/?section=personal&billing=yearly
Some links may be affiliate links, which at no additional cost to you, gives me a small portion of the purchase.
Chapters:
00:00 Intro & Overview
01:43 Why ScriptableObjects over Prefabs?
02:35 GunType.cs
02:48 ShootConfigScriptableObject.cs
03:28 TrailConfigScriptableObject.cs
04:26 GunScriptableObject.cs - Variables
05:45 GunScriptableObject.cs - Spawn()
06:33 GunScriptableObject.cs - CreateTrail()
07:15 GunScriptableObject.cs - Shoot()
09:14 GunScriptableObject.cs - PlayTrail()
10:47 Design Discussion
11:27 GunScriptableObject.cs - Adding Impact Effects with SurfaceManager
12:22 Become a Supporter
12:53 PlayerGunSelector.cs
14:28 PlayerAction.cs
15:08 Creating & Configuring the Gun ScriptableObjects
19:48 Demo
21:00 Closing Thoughts on this Implementationver










