Firearm
Before networking a firearm, complete the Firearm setup in the base FPS Framework first ensure it works correctly there, then follow the FPSF Pro networking steps to network the weapon.
Now, you can follow the same process used for the FPS Controller and Inventory. Simply right-click on the Firearm component, then select Setup > Network Components.

This will add NetworkFirearm component which has 2 fileds, Network Pickable and Network Projectile. Let's starts with Network Projectile. Find the default Projectile prefab or your own projectle, right click Setup > Network Components then make it a prefab and assgin it to Network Projectile field.

For NetworkPickable see Pickable for Pro asset and assgin it to Network Pickable.
Multiplayer View
If you’re using custom meshes or animations for other players to see, attach the PlayerItemsLocomotion component to handle their synchronization properly.

The TargetItem field should reference the prefab of your networked firearm. This allows the component to detect when the player is holding that specific item. If the player is holding it, the firearm’s mesh becomes visible to other players, while the active weapon in the inventory is hidden.
Other fields are self explantory:
The PlayerAttachmentsManager is a centralized manager that handles enabling and disabling items across the network. Attach it to the player object this allows weapons to check whether they should be active or not based on the manager’s state.
The CasingEjectionPort defines the point where shell casings are ejected. Adjust its position and rotation to match the location and direction of your custom mesh for accurate visual alignment.
The LocomotionAnimationLayer specifies which animator layer the weapon controls. Its weight is automatically set to 0 when the item is inactive and to 1 when the item becomes active.
Last updated
Was this helpful?