Uploaded May 2023 | Updated September 2026, 1 hour ago
Learn how to create a Gun Attachment System in Unity. We'll be leaning heavily on systems built earlier videos in the series - specifically 8 (youtube.com/watch?v=RbIk6VnwHnI&list=PLllNmP7eq6TQJjgKJ6FKcNFfRREe_L6to&index=8&pp=gAQBiAQB) and 9 (youtube.com/watch?v=Y-Qr6GPN2v0&list=PLllNmP7eq6TQJjgKJ6FKcNFfRREe_L6to&index=8&pp=gAQBiAQB)!
Adding attachments gives your players the opportunity to customize their experience in your game which adds some significant depth. In this video, learn how to do the data modeling for attachments and create the UI to enable your players to customize their guns with attachments!
πΆ 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
π Resources:
π Modifier System: youtube.com/watch?v=RbIk6VnwHnI&list=PLllNmP7eq6TQJjgKJ6FKcNFfRREe_L6to&index=8&pp=gAQBiAQB
π Configurable Ammo Types like Explosive / Frost Rounds: youtube.com/watch?v=Y-Qr6GPN2v0&list=PLllNmP7eq6TQJjgKJ6FKcNFfRREe_L6to&index=8&pp=gAQBiAQB
π UI Toolkit Docs: docs.unity3d.com/Manual/UIElements.html
Some links may be affiliate links, which at no additional cost to you, gives me a small portion of the purchase.
Chapters:
00:00 Topic Introduction
00:37 System Overview
02:09 Page Overview
04:11 Reusable Component: Attachment Slot UI
06:05 Backing Class for Reusable Component - AttachmentSlot.cs
09:25 Data Model for Attachments - Attachment.cs
10:27 Dynamically Add Slot UI to Page
12:50 Disable User Input
14:29 Slot Enum Creation
14:40 Show Dynamic Attachments Per Slot
18:24 Selecting Attachments
21:39 Applying Attachment Modifiers to a Gun
24:23 Show/Hide Cursor
24:45 More Attachment Options
27:27 Allow Hiding of Attachment Options
28:08 Final Thoughts & Support LlamAcademy
Learn how to create a Gun Attachment System in Unity. We'll be leaning heavily on systems built earlier videos in the series - specifically 8 (youtube.com/watch?v=RbIk6VnwHnI&list=PLllNmP7eq6TQJjgKJ6FKcNFfRREe_L6to&index=8&pp=gAQBiAQB) and 9 (youtube.com/watch?v=Y-Qr6GPN2v0&list=PLllNmP7eq6TQJjgKJ6FKcNFfRREe_L6to&index=8&pp=gAQBiAQB)!
Adding attachments gives your players the opportunity to customize their experience in your game which adds some significant depth. In this video, learn how to do the data modeling for attachments and create the UI to enable your players to customize their guns with attachments!
πΆ 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
π Resources:
π Modifier System: youtube.com/watch?v=RbIk6VnwHnI&list=PLllNmP7eq6TQJjgKJ6FKcNFfRREe_L6to&index=8&pp=gAQBiAQB
π Configurable Ammo Types like Explosive / Frost Rounds: youtube.com/watch?v=Y-Qr6GPN2v0&list=PLllNmP7eq6TQJjgKJ6FKcNFfRREe_L6to&index=8&pp=gAQBiAQB
π UI Toolkit Docs: docs.unity3d.com/Manual/UIElements.html
Some links may be affiliate links, which at no additional cost to you, gives me a small portion of the purchase.
Chapters:
00:00 Topic Introduction
00:37 System Overview
02:09 Page Overview
04:11 Reusable Component: Attachment Slot UI
06:05 Backing Class for Reusable Component - AttachmentSlot.cs
09:25 Data Model for Attachments - Attachment.cs
10:27 Dynamically Add Slot UI to Page
12:50 Disable User Input
14:29 Slot Enum Creation
14:40 Show Dynamic Attachments Per Slot
18:24 Selecting Attachments
21:39 Applying Attachment Modifiers to a Gun
24:23 Show/Hide Cursor
24:45 More Attachment Options
27:27 Allow Hiding of Attachment Options
28:08 Final Thoughts & Support LlamAcademy










