⮞ Go to NeoFPS.com

    Show / Hide Table of Contents

    ModularFirearmAttachmentPickup MonoBehaviour

    Overview

    The ModularFirearmAttachmentPickup behaviour is used alongside an InteractiveObject or InteractivePickup to apply an attachment to the selected weapon. If the attachment requires an inventory item, then you can use the InteractivePickup component to pick up the attachment before this behaviour tries to apply it to the weapon. In this situation, if the selected weapon cannot accept the attachment then the inventory item will still be added to the player inventory, allowing them to select the attachment using the attachment popup when using a weapon that can accept the attachment.

    Inspector

    ModularFirearmAttachmentPickup

    Properties

    Name Type Description
    Attachment ModularFirearmAttachment The attachment to apply to the firearm when picked up. This can be any attachment that inherits from the base ModularFirearmAttachment class.
    Socket String The name of the socket the attachment should be applied to.
    Consume Result Dropdown What to do to the pickup object once its attachment has been applied to the firearm. Options are Destroy, Disable, Nothing.

    See Also

    Modular Firearms

    Modular Firearm Attachments

    Back to top Copyright © 2019 Yondernauts Game Studios Ltd
    Generated with DocFX