private void OnTriggerEnter(Collider other) { Attachments attachment = other.GetComponent <Attachments>(); if (attachment == null) { return; } if (attachment.isAttachable) { attachment.Attach(this); attachmentManager.Attachments.Add(attachment); } }