Attachment System Guide

Recently, I have posted a couple videos of guns that change appearance in response to attachments being added, and attachments that change appearance on certain guns.

This saw a moderate amount of interest, so I figured I would release the unity files for this system plus an unrelated music video.

Link to the unity files


This is awesome, very kind of you to share!

Edit: :neutral_face:


First, here’s how this works, because he didn’t post a tutorial in the files, it’s just a rickroll or anything like that.

The eaglefire and swissgewehr work this way:
Both guns have a gun event hook and an effect spawner and the magazine they both share have a weather event hooks with different weather conditions. The custom weather event hooks just changes the model into an another model. Now I have no idea how you spawned in weather using an effect spawner, so I must applaud you for that.
Another thought I had about this method is that this can change every single magazine on the map on the gun with military magazine as soon someone starts reloading.

The zubeknakov works with a player collision component, the problem with this is that it doesn’t work with custom attachments, only attachments that are tailored for it, which you didn’t include. These attachments have a gameobject with a box collider and a rigid body tagged as player. This is a fairly decent method and it works fine, even in 1st person, but I am gonna step over the gun and the sight mount, for which you didn’t include a model, is gonna disappear.

I have my own method which does work as well, but like yours, unrealibly.

Also, please, do not mislead people in the future and put on a facade that you’re helpful, it’s mean.


please correct me if I’m wrong, but from what I see this wouldn’t work very well in multiplayer? it uses a weather event hook to change the magazine, so if its raining and someone reloads their gun I assume its just going to stop raining, also wouldn’t this change everyone elses magazine? I was under the assumption this would fix the escalation magazine issue, but this just looks like it would cause more problems then it solves :face_with_diagonal_mouth:. also as Ente said, please dont mislead people.


You are wrong, it works seamlessly in singleplayer and multiplayer alike.

Cool! maybe include a proper explanation in the files next time :smiley: